Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle Null values in Access 2000 VBA 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
I am trying to exit my code if the following value is Null

If Label.Value = Null then Exit Sub
If Label.Value = "" then Exit Sub
If Label.Value = "Null" then Exit Sub
If Label.Value.IsNull then Exit Sub
If IsNull.Label.Value then Exit Sub

None of these seem to work, how are these handled?
Thanks
 
You may try this:
If Trim(Label.Value & "") = "" Then Exit Sub

BTW, you really have an object named Label ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
This may also work:

If Len(Label.Value & vbNullString) = 0 Then Exit Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top