TripleJHJO
Programmer
I am trying to run this piece of code in an Access 2002 database. I keep getting a "Type Mismatch" error on the Set rstlocations line of the code and I am not sure why. Can anyone advise?
Thanks,
J. Jensen
Thanks,
J. Jensen
Code:
Private Sub cmdCopySigs_Click()
'copy signatures from first record to 2nd and 3rd records
Dim dbsCurrent As Data
Dim rstLocations As Recordset
Dim sigBytes() As Byte
Dim lFieldsize As Long
Dim SQL As String
'get signature BLOB data into sigBytes var
Set rstLocations = CurrentDb.OpenRecordset("Zinger")
rstLocations.MoveFirst
lFieldsize = rstLocations.Fields("Signature").DefinedSize
ReDim sigBytes(lFieldsize)
sigBytes = rstLocations.Fields("Signature").GetChunk(lFieldsize)
'copy sigBytes data into 2nd and 3rd records signature fields
rstLocations.MoveNext
While Not rstLocations.EOF
' rstLocations.Edit
rstLocations.Fields("Signature").AppendChunk (sigBytes)
rstLocations.Update
rstLocations.MoveNext
Wend
rstLocations.Close
End Sub