Where Clause - trouble with Quotation Marks (1 Viewer)

Elana

Registered User.
Local time
Today, 12:34
Joined
Apr 19, 2000
Messages
232
Hi -

I'm trying to programmatically set a report filter behind a Print button using two criteria on the active form (showid) and (txtdate).

I'm having trouble with this expression and I know it has to do with quotation marks:


myfilter = "[showid] = " & "forms!frmexhibitorsbyshow!showid" And "[dateadded] = " & "Forms!frmexhibitorsbyshow!txtdate"

The way I currently have it, I'm getting a "type mismatch" error when I attempt to run the report.

Can someone out there set me straight? Thanks,

E
 

Elana

Registered User.
Local time
Today, 12:34
Joined
Apr 19, 2000
Messages
232
Never mind, I figured it out (needed to place quotation marks around the "and" operator:

myfilter = "[showid] = " & "forms!frmexhibitorsbyshow!showid" & " And " & "[dateadded] = " & "Forms!frmexhibitorsbyshow!txtdate"

Works great now.
 

Users who are viewing this thread

Top Bottom