Re: Need Macro to do Basic Repetitive Tasks



Rating responses is a function of the web-based newsreader, I believe.
For the other part of your question, try doing a Google groups search for:
Microsoft Access form specify report parameter (or something like that).
Using a form to specify report parameters is a fairly common situation, and
the methods for doing so are well-documented. I will just mention that the
method described in Access Help may not be the best one.
I would suggest that the best approach to solving a problem of this sort is
to describe the desired end result. A summary of what you have tried may
help show that you made an effort to solve the problem before you posted,
but there's no need for a lot of detail about what doesn't work. Everything
you have described in your hypothetical macro can be accomplished through
the use of a parameter form, but you seem almost to have gotten locked into
the idea of using a macro.

"Lung" <Lung@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4AA1440C-87D6-4E1E-AED4-5CC86F6048A5@xxxxxxxxxxxxxxxx
Thank you for your response and I'll try your suggestion. BTW, I get
these
e-mails suggesting that I rate responses but when I click on the links and
look around, I can't find where to thank/rate responders. If you care to
respond or think it's important, any clues on this are appreciated.

Lung
---------------------------------------------------------------------

"tina" wrote:

you can't change a query's SQL statement with a macro, you'd have to do
it
in VBA. but there's no need anyway; instead, you can set your query
criteria
to refer to a control on a form, and the query will use whatever is typed
in
the control. you should be able to use the same technique in the textbox
control on the report - set the ControlSource to refer to the control on
the
form, as

=Forms!FormName!ControlName

and in report preview the control will display whatever is typed in the
form
control.

hth


"Lung" <Lung@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7950E63A-84A5-452B-9B53-C43762BABE74@xxxxxxxxxxxxxxxx
I've been using Access to run some monthly reports, manually changing
data
in
a Query and the title in a Report (which utilizes the Query) each
month.
That works fine except it's a bit repetitive since I do 6 different
runs
each
month. I've never used a Macro before but I created one to try to
automate
the process, and it did a few of the things I wanted it to.
Unfortunately
I
feel like I'm a long ways off on what I thought should be a simple
project,
particularly the way things are automated these days. I read through
many
help screens and newsgroup items but only got a little further. I'd
take
a
class and learn more but I doubt I'll need to do another Macro anytime
in
the
next few years. Any help you can provide would be greatly appreciated.

Is there a Macro Record feature in Access whereby you can just run
through
the keystrokes and have Access enter the correct Macro protocol? If
so,
how
do I get to it?

If none exists, here's what I want to do.
1) Pop open a entry screen so I can enter the appropriate month number
(e.g., 2 = February) of the Report I need to run, and the appropriate
year
(e.g. 2006).
2) Open up the "Test" Query in design mode.
3) Select the criteria box of the "Client Code" field, and change the
alphabet listing so that it reads ... Like "[M-Z]*"
4) Select the criteria box of the "Month" field, and change the month
number so that it reads ... Like "02*"
5) Save the Query, Close the Query, and Open up the "Test" Report.
6) Select the text field "Text16" and change it to show the correct
alphabet and month (hopefully automatically based on my input in step
2)
so
that it reads ... "Monthly Report for February 2006 M-Z"
7) Print the report
8) Save and/or Close the Report.
9) Repeat steps 2 to 9 for the other reports.





.



Relevant Pages

  • RE: Why cant I open a report using VB?
    ... You'll also get a message box telling you the value of the txtID control - ... Run the query to see if it returns any records. ... know that the query is fine, and so is the data that the report is based on. ... intTestID = Forms!frmDrive!Text35.Value ...
    (microsoft.public.access.modulesdaovba)
  • RE: Why cant I open a report using VB?
    ... Right, plugging the number into the criteria works, so the query itself is ... "Stuart At Work" wrote: ... know that the query is fine, and so is the data that the report is based on. ... is to check that the control that you refer to to populate the variable ...
    (microsoft.public.access.modulesdaovba)
  • RE: Filter Query by Year on a form
    ... If the check box does not affect what data are retrieved by the query, ... launch several different reports. ... it will launch that particular report say material cost report or ... If the user enters a year in the from year control and nothing in the to ...
    (microsoft.public.access.queries)
  • Re: Change of field name causes application to crash
    ... I can create a simple Sum query and get the same crash. ... UNION ALL query to simply UNION. ... > are part of the report. ... Sometimes when you have a control ...
    (microsoft.public.access.modulesdaovba)
  • RE: Report weirdness....
    ... My query works fine, Joseph - it's the report based on the query I'm getting ... I've tried removing JUST the control involved, & the report works fine. ... "Duane Hookom" wrote: ...
    (microsoft.public.access.reports)