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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Answer? Print one record of a report based on dialog box filter

Status
Not open for further replies.

dcorleto

MIS
May 19, 2002
82
US
Have a report named "Workorder" setup from a Query. The total number of records is about 30. I would like to have the following happen...

From the switchboard have an option to generate a workorder. A Dialog box would open requesting the "Code" (that is, one of the fields that has a unique record entry) and then have just that one page of the report come up and be able to print just that page for the record that the user inputs as the code.
Is there a quick way to go about this? Many thanks in advance.
 
If the code field is text:
[tt]DoCmd.OpenReport "rptReport", acViewPreview, , "Code='" & Me.txtCode & "'"[/tt]
If it is numeric:
If the code field is text:
[tt]DoCmd.OpenReport "rptReport", acViewPreview, , "Code=" & Me.txtCode[/tt]

Where txtCode is the name of the control on the dialog form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top