command button on form to run totals report

J

joe

Hello

Is it possible to automatically run a report from a form.I already have a report that uses a query to run a two column totals sum report, i would like the form to have a comman button so the dat entry person could just click at the end of the day and the report would run.Thanks
 
F

fredg

Hello,

Is it possible to automatically run a report from a form.I already have a report that uses a query to run a two column totals sum report, i would like the form to have a comman button so the dat entry person could just click at the end of the day and the report would run.Thanks
To run and print out the report without preview, code the command
button's click event:
DoCmd.OpenReport "ReportName"

To preview the report, code
DoCmd.OpenReport "ReportName", acViewPreview
 
T

tina

open your form in design view. make sure the Control Wizards toolbar button
is selected. then add a command button to your form - the wizard will open
automatically. follow the prompts, and the wizard will write the code to
open your report, for you.


joe said:
Hello,

Is it possible to automatically run a report from a form.I already have a
report that uses a query to run a two column totals sum report, i would like
the form to have a comman button so the dat entry person could just click at
the end of the day and the report would run.Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top