G Guest Apr 24, 2007 #1 Can I put a command button on a form the will Print Preview a Report of that current record showing in the form?
Can I put a command button on a form the will Print Preview a Report of that current record showing in the form?
G Guest Apr 24, 2007 #2 Hi LilBomShl, Yes, you can. Set the query powering the report so that it picks up the ID of the record off the form, like this: select * from TABLENAME where IDFIELD = forms!FORMNAME.IDFIELDNAME Then use the following in the on click event of the command button: docmd.openreport "REPORTNAME", acViewPreview Hope this helps. Damian.
Hi LilBomShl, Yes, you can. Set the query powering the report so that it picks up the ID of the record off the form, like this: select * from TABLENAME where IDFIELD = forms!FORMNAME.IDFIELDNAME Then use the following in the on click event of the command button: docmd.openreport "REPORTNAME", acViewPreview Hope this helps. Damian.
G Guest Apr 24, 2007 #3 Check this link on "Printing the Record on the Microsoft Access Form to a Report" http://www.databasedev.co.uk/report_from_form_record.html **** That way you can print the report from different forms if you need to and you are not fixed on one form only **
Check this link on "Printing the Record on the Microsoft Access Form to a Report" http://www.databasedev.co.uk/report_from_form_record.html **** That way you can print the report from different forms if you need to and you are not fixed on one form only **
G Guest Apr 24, 2007 #4 Thank you!! LiL Damian S said: Hi LilBomShl, Yes, you can. Set the query powering the report so that it picks up the ID of the record off the form, like this: select * from TABLENAME where IDFIELD = forms!FORMNAME.IDFIELDNAME Then use the following in the on click event of the command button: docmd.openreport "REPORTNAME", acViewPreview Hope this helps. Damian. Click to expand...
Thank you!! LiL Damian S said: Hi LilBomShl, Yes, you can. Set the query powering the report so that it picks up the ID of the record off the form, like this: select * from TABLENAME where IDFIELD = forms!FORMNAME.IDFIELDNAME Then use the following in the on click event of the command button: docmd.openreport "REPORTNAME", acViewPreview Hope this helps. Damian. Click to expand...
G Guest Apr 24, 2007 #5 Thank you!! Ofer Cohen said: Check this link on "Printing the Record on the Microsoft Access Form to a Report" http://www.databasedev.co.uk/report_from_form_record.html **** That way you can print the report from different forms if you need to and you are not fixed on one form only ** Click to expand...
Thank you!! Ofer Cohen said: Check this link on "Printing the Record on the Microsoft Access Form to a Report" http://www.databasedev.co.uk/report_from_form_record.html **** That way you can print the report from different forms if you need to and you are not fixed on one form only ** Click to expand...