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!

Print command button on form 1

Status
Not open for further replies.

MIKERYAN

Programmer
Jul 13, 2000
9
0
0
US
Would like to know if there is a way to have a command button on a (multi Table ) one form that will print a report of current data that was entered. I currently have a command to open report run off a query with parameter value windows. That too many steps would like simplify it.
 
Use the OpenReport method of the DoCmd command.&nbsp;&nbsp;For example<br><br>&nbsp;&nbsp;&nbsp;&nbsp;stDocName = &quot;Your reportName&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;stAccount = &quot;[Field1] = Forms!frmName!Field1&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;DoCmd.OpenReport stDocName, acPreview, stAccount<br><br><br>This will open the report from your form, using the criteria you set in the variable stAccount (or whatever you name it).<br><br>Lightning<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top