Null expression???

  • Thread starter Thread starter MartinR
  • Start date Start date
M

MartinR

I want to write an IF statment that will make a obj control box appear
only if there exists a picture for that record. Ie i want to know what
Null expression i can use to distinguish if the picture exists or not.
At the moment, this is the code i am using, but i am getting run time
error '424'....object required .....when i go to run it.

If Me![Picture3] Is Null Then
Me![Picture3].Visible = False
Else
Me![Picture3].Visible = True
End If


The first line of code is where the error is.

Can someone throw some light on my problem,
Thanks
 
"Is Null" is SQL syntax, as used in queries, in VBA code you need to use the
IsNull() function instead to test for Null values ...

If IsNull(Me!Picture3) Then

If that doesn't work for you, could you clarify what type of control is
'Picture3'?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top