I have a customer form with 2 buttons "new orders" and "open orders"
I want the "open orders" btn to open only if the customer has and active order " is paid" is not checked
if the button "open orders" is pressed and there is not an open order I want a msgbox to display "customer does not have an open order"
my code still opens the order even if the "is paid" is checked.
any help would help
Private Sub OpenOrderBtn_Click()
DoCmd.OpenForm "OrderF", , , "[CustomerID]=" & [CustomerID]
If IsPaid = True Then
MsgBox "Customer does not have an open order"
End If
End Sub
I want the "open orders" btn to open only if the customer has and active order " is paid" is not checked
if the button "open orders" is pressed and there is not an open order I want a msgbox to display "customer does not have an open order"
my code still opens the order even if the "is paid" is checked.
any help would help
Private Sub OpenOrderBtn_Click()
DoCmd.OpenForm "OrderF", , , "[CustomerID]=" & [CustomerID]
If IsPaid = True Then
MsgBox "Customer does not have an open order"
End If
End Sub