docmd.openreport with where condition

indesisiv

Access - What's that?
Local time
Today, 22:30
Joined
Jun 13, 2002
Messages
265
I am sure this is a monday morning problem for me. I have search and tried to implement what i have found but as far as I can tell that is what i am already doing.

Here is the situation

I have a form with a command button to open a report that is identical to the form for printing. (all the field names and tables etc)

I am trying to get it to display the correct form (eg the one that i am viewing)

I have a text box (txtUniqueID) that displays the PK of the table (IDCode) so i am using this and i get a parameter box .. any ideas.

Code:
docmd.openreport "rptForm", acViewPreview, , "txtUniqueID = " & [IDCode]

is this right?

Thanks
Steve
 
docmd.openreport "rptForm", acViewPreview, , "[IDCode] = " & Me! [IDCode]
 

Users who are viewing this thread

Back
Top Bottom