Please Help!!?? Ending Code - Short

A

A. Smart

Sorry not that familiar with VB.
How do I tell the code to stop if a certain field is empty, or continue if
the field is not null?? I've got the first bit!!

If (Nz(Me.Issue_Date.Value, "") = "") Then

Cheers
 
A

Allen Browne

Use the IsNull() function to test for null:

If IsNull(Me.Issue_Date) Then ...
 
K

Klatuu

You have the basic logic there. What do you mean by stop?
Exit the database?
Close the form?
Have the user do something?
 
J

John Spencer

You can quit the procedure by using
Exit Sub
or
Exit Function


If IsNull(Me.Issue_Date) then
Exit Sub ' or Exit Function
End If
 
D

Douglas J Steele

WARNING: using END is a very drastic thing to do. It shuts Access down
without doing cleanup-type stuff that may be important.

As John suggested, Exit Sub or Exit Function is likely more appropriate.
 
Top