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

Open report with only 1 record

Status
Not open for further replies.

yu

Programmer
Feb 26, 2001
7
0
0
SG
Hi...I have a form consist of employee information..How do I open a report that display only 1 employee information by click a "open report" button.

thanks in advance
 
Try this
Create a query that has the fields you want on your report.
then in the key field in the criteria box in teh new query, put this:
Forms![YourFormName]![YourKeyfield]

Save you new query
Open the form and pick a record
Then open the query it should show just that one record.
Then open your report in design view and change its "Record Source" to the new query.
Open your form pick a record then open the report it should also show the same record.

;-)

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Or when you open the report with DoCmd.OpenReport, include a WHERE condition.

DoCmd.OpenReport "rptClients", acViewPreview,, "fldClientID = " & txtClientID

Rob Marriott
rob@career-connections.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top