G
Guest
When I am in a field property and go to build an event, it asks me if I want
"Expression Builder", "Code Builder", or "Macro Builder". I thought I would
do code builder and this is the code that I built:
Private Sub MethodofPaymentID_AfterUpdate()
If frmPurchaseOrder.MethodofPaymentID = MasterCard Is True Then
DoCmd.OpenForm frmExpenseReport
Else: frmPurchaseOrder.MethodofPaymentID = MasterCard Is False
DoCmd.GoToControl SupplierID
End If
End Sub
I don't know if this code is correct or anything, but when I try and test it
its bring up the macro name screen. Do I have to name it with a macro name
and put the macro name into the after update property? Obviously, I am new
to writing code, etc. but I was pretty proud that I managed to get through
this far without "Mr. Red" showing up. Any help is appreciated. Thanks.
"Expression Builder", "Code Builder", or "Macro Builder". I thought I would
do code builder and this is the code that I built:
Private Sub MethodofPaymentID_AfterUpdate()
If frmPurchaseOrder.MethodofPaymentID = MasterCard Is True Then
DoCmd.OpenForm frmExpenseReport
Else: frmPurchaseOrder.MethodofPaymentID = MasterCard Is False
DoCmd.GoToControl SupplierID
End If
End Sub
I don't know if this code is correct or anything, but when I try and test it
its bring up the macro name screen. Do I have to name it with a macro name
and put the macro name into the after update property? Obviously, I am new
to writing code, etc. but I was pretty proud that I managed to get through
this far without "Mr. Red" showing up. Any help is appreciated. Thanks.