I have created a form to display my data in a simple name and address table.
I have created buttons to navigate through the records but want to create a
button to print just the current record, ideally with a different layout to
that used on the form.
No matter what I do it always prints all the records. I could select the
page range in the print dialog box but I want it to print just the current
record to make it easy for other to use.
How do I do this?
thanks
Brian
Daniel - 31 May 2007 13:04 GMT
You should create a report based on the same source as the form (would have
all the records by default). Then from your form button you would open the
report adding a filter, thus only displaying a single record (you can also
send it directly to the printer).
Take a look at:
http://forums.aspfree.com/microsoft-access-help-18/print-report-for-current-reco
rd-19158.html
http://articles.techrepublic.com.com/5100-10877-6160599.html
http://en.allexperts.com/q/Using-MS-Access-1440/Printing-current-record.htm
http://www.databasedev.co.uk/print_form_record.html

Signature
Hope this helps,
Daniel P
> I have created a form to display my data in a simple name and address table.
> I have created buttons to navigate through the records but want to create a
[quoted text clipped - 6 lines]
> thanks
> Brian
Jeff Boyce - 31 May 2007 13:12 GMT
Brian
One approach might be to add your command button and use:
DoCmd.OpenReport "YourReportName",,,WHERE-condition
Check Access HELP for exact syntax. The "WHERE-condition" clause will be
where you specify that the ID field (in the report) needs to match the ID of
the record displayed in your form.

Signature
Regards
Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
Microsoft Registered Partner
https://partner.microsoft.com/
> I have created a form to display my data in a simple name and address table.
> I have created buttons to navigate through the records but want to create a
[quoted text clipped - 6 lines]
> thanks
> Brian