Multiple Message Boxes Access 2000

M

Mike Wilson

Hi all

I am trying to code a series of message boxes that activate if certain
fields are left blank before running a save procedure that transfers the
contents of one form to another but yet again I seem to be going around
in circles....

Code

Dim MSG as string, Answer

#If Isnull(Me.Category) or Me.Category="" then
Msg = "Please Enter Category!"
Answer = Msgbox(Msg, vbokonly, "Category ?")
#ElseIf
Isnull(Me.SM) or Me.SM="" then
Msg = "Please Enter Ship Method!"
Answer = Msgbox(Msg, vbokonly, "Ship Method ?")
#ElseIf

Procedure for generating order number then

DoCmd.RunMacro "Save1"

#End IF

What I am trying to achieve is should either field be blank
then the macro and procedure doesn't run.

Making the fields required, isn't an option because of
populating a subform and forcing a refresh on the main form

Thank you for any assistance


Mike
 

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

Top