macro for selective printing

I

Ideation

we have created a switchboard which takes care of all tasks from
entering data, generating various reports and viewing those reports.

We want to write a macro which asks the user for the dates i.e. from
date and to date for which the reports need to be printed.

can this be done? if yes, will anyone guide us in this?

if not, can it be so done that last 10 records are printed from the
last generated report
 
S

Steve Schapel

Ideation,

Put 2 unbound textboxes on the form, where you enter the dates required.
Then, in the Criteria of the date field in the query that the report
is based on, put like this...
Between [Forms]![NameOfForm]![DateFrom] And [Forms]![NameOfForm]![DateTo]

To get the 10 records, sort the query descending, and then enter 10 in
the Top box in design of the query.
 
I

Ideation

Thanks Steve you have been a great help.
Ideation,

Put 2 unbound textboxes on the form, where you enter the dates required.
Then, in the Criteria of the date field in the query that the report
is based on, put like this...
Between [Forms]![NameOfForm]![DateFrom] And [Forms]![NameOfForm]![DateTo]

To get the 10 records, sort the query descending, and then enter 10 in
the Top box in design of the query.

--
Steve Schapel, Microsoft Access MVP
we have created a switchboard which takes care of all tasks from
entering data, generating various reports and viewing those reports.
We want to write a macro which asks the user for the dates i.e. from
date and to date for which the reports need to be printed.
can this be done? if yes, will anyone guide us in this?
if not, can it be so done that last 10 records are printed from the
last generated report
 

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