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!

preview only Current form info on the rpt

Status
Not open for further replies.

hengsin

Technical User
Mar 26, 2003
128
MY
Let say there is one form about the employee. There are so many records on that form. For example,
EmployeeID EmployeeName
1 john
2 samad
3 lin
4 michael
5 lim
6 chew

Usually in the database, the report we are able to preview is all the information. In this example, the report generated will be list down all employee information.

Now i want to do is when i open up the Employee form and looking at Michael information on the form. I want to preview Michael only information on the report with a click of a button. No other information will on the report but only Michael. Can i know how to do this?

 
In the code behind your button, add a Wherecondition argument to the Docmd.openreport command; for example:

docmd.OpenReport "rptYourReport", acViewNormal,,"EmployeeId=" me!EmployeeId

Hope this helps,



Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top