Create Macro to print current record in form only

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

Without using the button wizard, does anyone know the
steps for creating a Macro to print current record in form
only?

I have:
1. OpenForm
2. PrintOut

It prints ALL the records, not just the one it's on.

Thanks!
 
Janet,

Whereas it is technically possible to print a form, this is not the
primary purpose of forms, and the functionality is therefore limited. I
suggest you make a Report to print out the data you want. Then you can
use an OpenReport action in your macro to print the report, and in the
Where Condition argument of the macro, refer to the primary key field of
the form's current record, using syntax such as...
[YourID]=[Forms]![YourForm]![YourID]
 
Thanks. That will solve my problem!

Janet
-----Original Message-----
Janet,

Whereas it is technically possible to print a form, this is not the
primary purpose of forms, and the functionality is therefore limited. I
suggest you make a Report to print out the data you want. Then you can
use an OpenReport action in your macro to print the report, and in the
Where Condition argument of the macro, refer to the primary key field of
the form's current record, using syntax such as...
[YourID]=[Forms]![YourForm]![YourID]

--
Steve Schapel, Microsoft Access MVP

Without using the button wizard, does anyone know the
steps for creating a Macro to print current record in form
only?

I have:
1. OpenForm
2. PrintOut

It prints ALL the records, not just the one it's on.

Thanks!
.
 
Back
Top