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.
 

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

Similar Threads

Code for Message 3
List Box Search 3
On error displayes default error code instead of the specifyed one 6
If...and 4
Code won't run! 7
Empty String 1
Replace "assign the null value" message 1
Combining codes 2

Back
Top