macro date entry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a series of reports that are based on entering some date parameters.
They are for each employee. I know how to set up a macro to run them all,
but how can I set it up so that it asks for the beginning and ending date at
the very beginning and then applies this parameter to all the reports? Each
of these reports is based on a query. I really need to know ASAP on this one.
 
I have a series of reports that are based on entering some date parameters.
They are for each employee. I know how to set up a macro to run them all,
but how can I set it up so that it asks for the beginning and ending date at
the very beginning and then applies this parameter to all the reports? Each
of these reports is based on a query. I really need to know ASAP on this one.

The simplest way is to create a little unbound form frmCrit with two
textboxes, txtFrom and txtTo; for your criteria use
= [Forms]![frmCrit]![txtFrom] AND <= [Forms]![frmCrit]![txtTo]

Put a command button on frmCrit to run your macro.

John W. Vinson [MVP]
 
GREAT! That worked well. Now one more question if possible. I have this
Macro set up to "print". Is there anyway to send it to a "specific" printer?
Ultimately I would like to send it to Adobe to immediately create a .PDF
file.

John W. Vinson said:
I have a series of reports that are based on entering some date parameters.
They are for each employee. I know how to set up a macro to run them all,
but how can I set it up so that it asks for the beginning and ending date at
the very beginning and then applies this parameter to all the reports? Each
of these reports is based on a query. I really need to know ASAP on this one.

The simplest way is to create a little unbound form frmCrit with two
textboxes, txtFrom and txtTo; for your criteria use
= [Forms]![frmCrit]![txtFrom] AND <= [Forms]![frmCrit]![txtTo]

Put a command button on frmCrit to run your macro.

John W. Vinson [MVP]
 
GREAT! That worked well. Now one more question if possible. I have this
Macro set up to "print". Is there anyway to send it to a "specific" printer?
Ultimately I would like to send it to Adobe to immediately create a .PDF
file.

Take a look at the online help for PrintOut. I don't use macros (I find VBA
code more flexible and actually often easier to use) so I'm not sure of the
details.

John W. Vinson [MVP]
 

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

Similar Threads


Back
Top