Yes, [Event Procedure] shows on the line "After Update" but nothing happens
when I update the field. Hold on . . . I thought I would double check and
for some reason it is recognizing the code. Sorry, but I think when I copied
the [Event Procedure] and moved it to After Update rather than on Exit, I did
not know that I needed to go into the code and change it there. So, now, it
runs but I get the error message "Compile Error: Type mismatch" on the "is
True" statement. I am not sure how to tell it that if I choose "Mastercard"
in the drop down to open another form but if it is NOT "Mastercard," then
just go to the next field.

Signature
S
> When you view the Event tab of the Properties window for the
> MethodofPaymentID control, does [Event Procedure] show in the box next to
[quoted text clipped - 24 lines]
> > 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.
Van T. Dinh - 29 Jun 2005 16:23 GMT
"Is" in this syntax operates on Objects, not Values.
Also, the syntax of the Boolean expression looks incorrect.
What is the Data-Type for MethodofPaymentID?
If it is Text, I think you need:
If (Forms!frmPurchaseOrder.MethodofPaymentID = "MasterCard") Then
...
I am not sure what you tried to do with the statement:
frmPurchaseOrder.MethodofPaymentID = MasterCard Is False

Signature
HTH
Van T. Dinh
MVP (Access)
> Yes, [Event Procedure] shows on the line "After Update" but nothing happens
> when I update the field. Hold on . . . I thought I would double check and
[quoted text clipped - 5 lines]
> in the drop down to open another form but if it is NOT "Mastercard," then
> just go to the next field.
Steve Schapel - 29 Jun 2005 20:08 GMT
> I am not sure what you tried to do with the statement:
>
> frmPurchaseOrder.MethodofPaymentID = MasterCard Is False
I think it means this:
Me.MethodofPaymentID <> "MasterCard"
But in the end, I think the code required is:
If Me.MethodofPaymentID = "MasterCard" Then
DoCmd.OpenForm frmExpenseReport
Else
DoCmd.GoToControl SupplierID
End If

Signature
Steve Schapel, Microsoft Access MVP
Van T. Dinh - 29 Jun 2005 23:45 GMT
That's what I guessed but the O.P. used "Else" with the colon after so the
statement looks like an assignment statement, not a Boolean expression being
used as criteria (for ElseIf?)

Signature
Cheers
Van
> > I am not sure what you tried to do with the statement:
> >
[quoted text clipped - 9 lines]
> DoCmd.GoToControl SupplierID
> End If
Steve Schapel - 30 Jun 2005 01:02 GMT
Van,
I cheated ;-) I also read right through to the last sentence of her
last post <g>

Signature
Steve Schapel, Microsoft Access MVP
> That's what I guessed but the O.P. used "Else" with the colon after so the
> statement looks like an assignment statement, not a Boolean expression being
> used as criteria (for ElseIf?)