Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open form criteria string

Status
Not open for further replies.

FranS37

Programmer
Jun 6, 2002
59
US
I'm getting a "type mismatch" erro on this line. Auditor code is a number and payment month is a date field that I've formatted into "mmmm yyyy". It doesn't open the form, but fails here.

Any help is appreciated. Thanks.

DoCmd.OpenForm "frmAuditorLookup", , , "[auditor_code] = " & Me.Auditor And "[paymentmonth] = "" & Me.PaymentMonth]
 
Try this:
Code:
DoCmd.OpenForm "frmAuditorLookup", , , "[auditor_code] = " & Me.[Auditor]  & " And [paymentmonth] = "" & Me.[PaymentMonth] & """

Let me know if that works for you.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top