B
Brian T
I have a report where I would like to open and print only the chosen record.
How to I specify the record?
Thanks
How to I specify the record?
Thanks
Brian said:I have a report where I would like to open and print only the chosen record.
How to I specify the record?
Marshall Barton said:Brian said:I have a report where I would like to open and print only the chosen record.
How to I specify the record?
If you have a form where users can navigate to the desired
record, then add a command button to open the report. The
code behind the button would look something like:
Dim stWhere As String
stWhere = "[primary key field]=" & Me.[primary key field]
DoCmd.OpenReport "report name", acviewPreview, , stWhere
Brian said:Thanks, but is there a way to write the same thing into an embedded macro?
Marshall Barton said:Brian said:I have a report where I would like to open and print only the chosen record.
How to I specify the record?
If you have a form where users can navigate to the desired
record, then add a command button to open the report. The
code behind the button would look something like:
Dim stWhere As String
stWhere = "[primary key field]=" & Me.[primary key field]
DoCmd.OpenReport "report name", acviewPreview, , stWhere