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

Open report based on value on form in .adp

Status
Not open for further replies.

Glohamar

Programmer
Sep 3, 2003
248
US
I know how to do this with a .mdb, but seem to be having problems with .adp. I do not have access to the SQL server, so I can not modify any of the views or stored proc. I am wanting to open a report to print with the same record that is on my form. Usually I would use a query, but no access.

Can someone help me. I am new with the .adp databases.

Dave
 
Dave,

Set the RecordSource of the report to be the same as the RecordSource for the form. Then in the Click event of the button that you use to launch the report, put the following

Code:
Dim strWhere as String

strWhere = "myRecordID = Forms!MyForm.myRecordID"

DoCmd.OpenReport myReport, acPreview, , strWhere

You will have to substitute the appropriate values for the my... references.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top