Private Sub SaveToDB()
Dim bytBLOB() As Byte
Dim strImagePath As String
Dim intNum As Integer
'Save the record
strImagePath = Trim$(txtImagePath.Text)
With rs
.Fields("ImageTitle") = _
Trim$(txtImageTitle.Text)
If (optImageType(0).Value) Then
'Save as file pointer
.Fields("ImagePath") = strImagePath
Else
If (txtImagePath.Text <> "") Then
'Open the picture file
intNum = FreeFile
Open strImagePath For Binary As #intNum
ReDim bytBLOB (FileLen(strImagePath))
'Read data and close file
Get #intNum, , bytBLOB
Close #1
'Store the BLOB
.Fields("ImagePath") = ""
.Fields("ImageBLOB"). _
AppendChunk bytBLOB
End If
End If
.Update
End With
End Sub