P
P-chu via AccessMonster.com
I have a module that is just not working right:
Publkic Function FmUnload(MyForm As Form) As Integer
If MyForm![OrderNo] <> 0 And MyForm![Condition] = "complete" Then
MsgBox "The Condition is "complete", but the OrderNo is empty."
FmUnload = True
End If
End Sub
***********************************
On the Parent form I have:
Private Sub Form_Unload(Cancel As Integer)
Cancel = FormUnload(Me)
End Sub
I will get a message box if the criteria is not met, but it still goes on to
a new form when that button is clicked and I want it to not go any further
until the criteria is met.
Thanks for any advice you can give please.
Publkic Function FmUnload(MyForm As Form) As Integer
If MyForm![OrderNo] <> 0 And MyForm![Condition] = "complete" Then
MsgBox "The Condition is "complete", but the OrderNo is empty."
FmUnload = True
End If
End Sub
***********************************
On the Parent form I have:
Private Sub Form_Unload(Cancel As Integer)
Cancel = FormUnload(Me)
End Sub
I will get a message box if the criteria is not met, but it still goes on to
a new form when that button is clicked and I want it to not go any further
until the criteria is met.
Thanks for any advice you can give please.