Link to home
Start Free TrialLog in
Avatar of anglandp
anglandp

asked on

MS Access 2010 - a button that will save a record and open a report for that record

Good afternoon - I'm creating an Access database to generate cab vouchers. A user presses a button, and is brought to a blank form. Information is then entered. At the bottom of the form, I need a button that saves the record, then opens a report - this report is the cab voucher. Every time I press the button, I get every cab voucher in the database - not the one that has just been entered.

How do I get the report to only generate the one record I just entered?
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you need to filter the report using the current record in the form.

something like this

docmd.openreport "reportName",,,"[CabID]=" & me.cabID

see this link  http://support.microsoft.com/kb/209560
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

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