(Using Access 2003 on Windows XP.)
I'm using the following code from http://www.databasedev .co.uk/image-form.html to display an image using an image control in my main form (frmVetted). This code is for the "Add Image" command button:
The code works fine if I delete an image, so I haven't posted the code for the delete button. However, the add image code stops here:
...which is in bold above. Apparently, it worked for the programmer on that site. I changed all the relevant areas to reflect my own DB, but now I'm getting on error that I have no clue how to fix. Any ideas? Thanks in advance.
I'm using the following code from http://www.databasedev .co.uk/image-form.html to display an image using an image control in my main form (frmVetted). This code is for the "Add Image" command button:
Code:
Private Sub cmdAddImage_Click()
On Error GoTo cmdAddImage_Err
Dim strFilter As String
Dim lngflags As Long
Dim varFileName As Variant
strFilter = "All Files (*.*)" & vbNullChar & "*.*" _
& vbNullChar & "All Files (*.*)" & vbNullChar & "*.*"
lngflags = tscFNPathMustExist Or tscFNFileMustExist _
Or tscFNHideReadOnly
varFileName = [b] tsGetFileFromUser( _ [/b]
fOpenFile:=True, _
strFilter:=strFilter, _
rlngflags:=lngflags, _
strDialogTitle:="Please choose a file...")
If IsNull(varFileName) Then
Else
Me![memPropertyPhotoLink] = varFileName
Forms![frmVetted].Form.Requery
End If
cmdAddImage_End:
On Error GoTo 0
Exit Sub
cmdAddImage_Err:
Beep
MsgBox Err.Description, , "Error: " & Err.Number _
& " in file"
Resume cmdAddImage_End
End Sub
Code:
varFileName = tsGetFileFromUser( _
Comment