peterbowles
Registered User.
- Local time
- Today, 04:09
- Joined
- Oct 11, 2002
- Messages
- 163
I have this code
Private Sub Form_Current()
On Error GoTo Err_Form_Current
If IsNull(Photo) Then
Photo = "C:\Documents and Settings\Peter\My Documents\My Pictures\nophoto.bmp"
Else
Me![ImageFrame].Picture = Me![Photo]
End If
Err_Form_Current
MsgBox "This is not a valid File Name", vbOKOnly
Photo = "C:\Documents and Settings\Peter\My Documents\My Pictures\nophoto.bmp"
Me![ImageFrame].Picture = Me![Photo]
End Sub
I cant get the error part of the code to work. It come up with a message
“Compile Error”
“Sub or Function not defined”
Any help would be great
Private Sub Form_Current()
On Error GoTo Err_Form_Current
If IsNull(Photo) Then
Photo = "C:\Documents and Settings\Peter\My Documents\My Pictures\nophoto.bmp"
Else
Me![ImageFrame].Picture = Me![Photo]
End If
Err_Form_Current
MsgBox "This is not a valid File Name", vbOKOnly
Photo = "C:\Documents and Settings\Peter\My Documents\My Pictures\nophoto.bmp"
Me![ImageFrame].Picture = Me![Photo]
End Sub
I cant get the error part of the code to work. It come up with a message
“Compile Error”
“Sub or Function not defined”
Any help would be great