> ' Assumes OLE field is bound to an OLE Frame control named "olePicture"
Dim a() As Long
Dim lTemp As Long
lTemp = LenB(Me.olePicture.Value) / 4
ReDim a(0 To lTemp)
' Copy the contents of the OLE field to our array
a = Me.olePicture.Value
Thanks for the reply.
The OLE field is just a field in a table, not bound to anything. Basically,
I just need to de-blob it and get the vaules.
I tried this:
Set rst = db.OpenRecordset("TableWithBlobField")
lngBlobSize = LenB(rst("BlobField"))
abytBlob = rst("BlobField").GetChunk(0, lngBlobSize)
For Each varItem In abytBlob
Debug.Print varItem
Next
the output of this is a bunch of Bytes, so it appears to be working, but the
data I'm looking for is a bunch of Singles. The VB App that did this before
had a "CopyMemory" function that returned a Single. Something like this:
CopyMemory sngBlobValue, abytBlob(lngBlobOffset), 4
I assume sngBlobValue is the return value, but I don't know what
lngBlobOffset is - unless it's 4.
Any ideas how to replicate this in VBA? How are the bytes in the byte array
converted into singles?