Create Macro on form to run a totals report at end of day.

J

Joe

Hello All,

I am designing a timecard database in which the user will
input the hours in a timecard form.I have already
experimented with one macro to automate one field such as
keying in employee number, then last name appears in
another field.Now i would like to create a command button
in design view on that same form so when all timecards are
entered, they can click the command button to run a report
automatically to summ up all hours for the day.Can this be
done?..will this involve running a macro from another
macro??..sorry for all the questions, i am new to this.
Thanks,Joe
 
S

Steve Schapel

Joe,

The only thing your macro will do here is to print the report, using an
OpenReport macro action. Other than that, you need to create a Query
which will return the data you want, and design your Report based on
this query. The totalling will most likely be done in calculated
controls directly on the report. I know you said you are "new to this",
so I hope this reply isn't too esoteric, and that it might point you in
the right direction.

Incidentally, your use of a macro to display a LastName based on the
entry of an EmployeeNumber is probably inappropriate. This is really a
job for either a query or a combobox.
 

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