Please Help!!?? Ending Code - Short

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
You have the basic logic there. What do you mean by stop?
Exit the database?
Close the form?
Have the user do something?
 
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
 
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.
 
Back
Top