Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Print current record displayed in the form

I have a command button in the footer of a form.  The form is Display View = Single Page.

Even though the form has several records that can be navigated to, I want to print JUST the record being displayed.  

What would the onclick code of the command button be to accomplish this?
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

create a report with recordsource based on the recordsource of your form then use this codes

docmd.openreport "NameOfReport", acviewNormal,, "[IdfieldName]=" & me.txtIdfield


change [IdfieldName] with actula name of the field
change txtIdfield with actual name of the control
Avatar of SteveL13

ASKER

I actually just want to print the form with the current record data included.  I realize that a report would be better looking.
access report is not really for printing, you may not like the result.
oops, that should be

access FORM  is not really for printing, you may not like the result.
ASKER CERTIFIED SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial