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
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