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

report to print selected record problem

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
0
0
GB
Hello again

Sorry I have another problem now. I have a report and want to be able to click a button on my form to print the report details for just the current record. I added a command button with the following code on the onclick event

DoCmd.OpenReport "rptIncidentReport", acViewReport, , "[ID] = " & [ID]

However if I do it on the 1st record that the form opens to it works but when I try and move to another record and click the button again it presents a report with no data in it

What am I missing here?

 
Learn how to troubleshoot by setting break points so you can step through your code.
Is your form single or continuous? Is the button in the detail section of the form?

Duane
Hook'D on Access
MS Access MVP
 
It's a single form with 4 tabs. The button is in the detail section. It's ok think I've solved it - issue seemed to be with my relationships in the underlying query - thanks for your help anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top