Hi, all. I need some help, please!
I need to combine two messages with the corresponding commands.
First I want to execute this command:
The second command I want to combine is:
How should I combine these commands to work?
I need to combine two messages with the corresponding commands.
First I want to execute this command:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Nz(Me.cbo_PSD, "") = "" And Nz(Me.numbeрOfPproducts, "") = "" Then
MsgBox "Please, enter the number of products!", vbInformation, "Attention !"
Cancel = True
Exit Sub
End If
The second command I want to combine is:
Code:
Dim answer As Integer
answer = MsgBox("Do you want to Continue?", vbQuestion + vbYesNo)
If answer = vbYes Then
'I want enter the number of products into txt_NumbersOfProduct
Else
'I want to go beck and exit the form.
Me.Undo
DoCmd.Close acForm, "fm_Inspection"
End If
End Sub