"Get Picture()" Function error

GIRLnSD

New member
Local time
Yesterday, 23:43
Joined
May 8, 2013
Messages
4
Need help with the following code. I keep getting error message. New to Code.

Option Compare Database
Function GetPicture()
With CodeContextObject
If Dir(.[ImageFile]) <> Empty Then
.[ImageControl].Visible = True
.[ImageControl].Picture = .[ImageFile]
Else
.[ImageControl].Visible = False
End If
End With
End Function

Thank you....
 
Empty is not a valid expression, do you mean NULL?

Change If Dir(.[ImageFile]) <> Empty Then

to
IF Not IsNull(Dir(.[ImageFile])) Then
 

Users who are viewing this thread

Back
Top Bottom