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

form and report sync on different data 1

Status
Not open for further replies.

irethedo

Technical User
Feb 8, 2005
429
US
I have a form which contains fields of data and a button to print a report. The report uses a query but for some reason the data in the report does not match the data on the form as it is displaying a different record from the table than the one on the form.

Does the data on the form need to be added (like DoCmd.GoToRecord , , acNewRec) before I can display it in a report?

How can I fix this so that the data in the report matches what is on the form when I click the button?

Thanks

Jeff
 
Jeff
Your DoCmd line would include a reference to the particular record you wish to print.

Something such as...
DoCmd.OpenReport YourReportName, acPreview, "", "[RecordID]=[Forms]![YourFormName]![RecordID]"

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top