Report /Printing Issue

  • Thread starter Thread starter Anthony Law
  • Start date Start date
A

Anthony Law

How can I print a specific record from a report? I have
tried several versions of the DoCmd method but this was
the best I could come up with:

DoCmd.OpenReport "Change_Request_1_Report",
acViewPreview, "tblChange_Request_1 Query"

This will bring up the report but a user would still have
to go to the 'Find', 'Print' menu option to select which
page to print. This is not acceptable.

An example; say my table has 500 records (which it
doesen't) in it. Instead of having said user scroll
through the entire report to locate a single record I want
a user to be able to find a report by entering the
Change_Request_ID field (primary key field in my table).
The specific record comes up in report and from there the
user can print that particular report.
 
How can I print a specific record from a report? I have
tried several versions of the DoCmd method but this was
the best I could come up with:

DoCmd.OpenReport "Change_Request_1_Report",
acViewPreview, "tblChange_Request_1 Query"

This will bring up the report but a user would still have
to go to the 'Find', 'Print' menu option to select which
page to print. This is not acceptable.

An example; say my table has 500 records (which it
doesen't) in it. Instead of having said user scroll
through the entire report to locate a single record I want
a user to be able to find a report by entering the
Change_Request_ID field (primary key field in my table).
The specific record comes up in report and from there the
user can print that particular report.

DoCmd.OpenReport "Change_Request_1_Report", acViewPreview, ,
"[Change_Request_ID] = " & [ID_Control_On_This_Form]

The above assumes the ID field is a number datatype.
The [ID_Control_On_This_Form] is a text control on the form in which
the user enters the record number wanted.
 
-----Original Message-----
How can I print a specific record from a report? I have
tried several versions of the DoCmd method but this was
the best I could come up with:

DoCmd.OpenReport "Change_Request_1_Report",
acViewPreview, "tblChange_Request_1 Query"

This will bring up the report but a user would still have
to go to the 'Find', 'Print' menu option to select which
page to print. This is not acceptable.

An example; say my table has 500 records (which it
doesen't) in it. Instead of having said user scroll
through the entire report to locate a single record I want
a user to be able to find a report by entering the
Change_Request_ID field (primary key field in my table).
The specific record comes up in report and from there the
user can print that particular report.

DoCmd.OpenReport "Change_Request_1_Report", acViewPreview, ,
"[Change_Request_ID] = " & [ID_Control_On_This_Form]

The above assumes the ID field is a number datatype.
The [ID_Control_On_This_Form] is a text control on the form in which
the user enters the record number wanted.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Fred,

After a few modifications it now works OK.
 
Back
Top