D
DeVille
I have this piece of code that checks if the [quantity]
text box is filled in on the orders subform before it
allows the user to run a macro to email the order to the
supplier. It works fine however, I would like to add
another condition in the IF segment that says, to also
check the [OrderSent] text box has the text 'Yes' entered
in it
Here is the code I have so far. The question marks
surround the code that I am unsure how to write if any
one could help complete the code thanks in advance
If IsNull(Forms![frmLocations]![subOrders].Form!
[Quantity])
Then
MsgBox "Enter the quantity before sending order."
??? Or IF (Forms![frmLocations]![subOrders].Form!
[OrderSent] = Yes
Then
MsgBox "Order has already been sent." ???
Else
Dim stDocName As String
stDocName = "mcrSendOrders"
DoCmd.RunMacro stDocName
End If
text box is filled in on the orders subform before it
allows the user to run a macro to email the order to the
supplier. It works fine however, I would like to add
another condition in the IF segment that says, to also
check the [OrderSent] text box has the text 'Yes' entered
in it
Here is the code I have so far. The question marks
surround the code that I am unsure how to write if any
one could help complete the code thanks in advance
If IsNull(Forms![frmLocations]![subOrders].Form!
[Quantity])
Then
MsgBox "Enter the quantity before sending order."
??? Or IF (Forms![frmLocations]![subOrders].Form!
[OrderSent] = Yes
Then
MsgBox "Order has already been sent." ???
Else
Dim stDocName As String
stDocName = "mcrSendOrders"
DoCmd.RunMacro stDocName
End If