Open a report from a form where...

Keeperen

Registered User.
Local time
Today, 21:17
Joined
Jun 26, 2012
Messages
19
Hello,

I´m fairly new at this, so please bear with we.

I have a form where I would like to add a "Print Current page" button, but the print should be formated according to a standard print report I created. In the form there are to fields that makes the entry uniqe from other pages of the form. The print report is set to ask for one of the two fields, but not the other.

What code should I put in the on click event ?

I'm guessing is something with docmd.openreport, but here is where my skills stop.

I'm using Access 2010.

In advance Thanks.
 
It is not clear exactly what you are doing but yes, you can open a report depending on a selected field in the active form.

When you start typing doCmd.OpenReport the intellisense starts helping you. below is just example

DoCmd.OpenReport "Client", acViewReport, "", "[client]![clientpk]=[Forms]![client2].[clientpk]", acNormal

In client table, report opens at a particular clientPK which is selected at Client2 form.

Hope it helps.

regards.
 

Users who are viewing this thread

Back
Top Bottom