Macros and Forms

  • Thread starter Thread starter Rossz
  • Start date Start date
R

Rossz

Am I correct in believing that you can't stick forms in a macro list unless
it's the last item? e.g.

-query
-form
-report

won't work because it doesn't wait for the form to close before running the
report.

This is going to make it tedious and redundant to add new reports that are
based on the same set of forms for gathering parameter data.
 
Rossz,

I believe you are right. The way to deal with it is to use
a separate macro for running the report(s), triggered by a
button on the input form, or the On Close event of the
from (or both).

Nikos
 
I believe you are right. The way to deal with it is to use
a separate macro for running the report(s), triggered by a
button on the input form, or the On Close event of the
from (or both).

That's how it's currently done, but I was hoping to change it. I have a
bunch of reports that use the same forms to prompt for the parameters. As
it is, I have to duplicate each and every form and macro used, the whole
mess only differing by which report is created in the final step. I end up
with 3 or 4 different forms and macros for each report instead of just one
slightly different macro. If I ever need to change something, I have to
remember to change each and every similar form (and/or macro).
 
you absolutely should not have to create separate forms
and macros just to run different reports. if you want to
send me a copy of your db, i'll see if i can either fix
your current setup or create an workable alternate, then
send it back so you can see how i did it.

i have Access 2000. if you take me up on my offer, you'll
need to send me a '97 or 2000 db. make a copy, remove
proprietary table data, compact, zip to under 2MB if
necessary, and send to: ttaccess1 at yahoo dot com
 
you absolutely should not have to create separate forms
and macros just to run different reports. if you want to
send me a copy of your db, i'll see if i can either fix
your current setup or create an workable alternate, then
send it back so you can see how i did it.

No can do. The company would have a fit if I sent it to anyone. They
consider not just the data itself to be proprietary, but the whole database
structure, too.

If you can direct me somewhere that can explain the procedure to follow, I
should be able to figure it out. Access is not my strongest point (my
specialty is configuration management), but I have enough computing
background to pick things up.
 
sorry, hon. i can think of half a dozen different ways to
run reports from forms, just off the top of my head, and i
can't begin to picture what kind of setup you have that
would require a separate form to call each report; i
wouldn't know where to start in suggesting how you might
fix your setup. that's why i offered to look at it.

i understand your situation regarding your company's
policy. hopefully somebody else in the newsgroup will step
in; some of the MVPs have a real genius (especially
compared to me) for visualizing a setup, diagnosing
problems and finding solutions.

if you don't get a response in a day or two, suggest you
post your question again. next time cross-post (don't
multi-post) in forms, reports and macros newgroups - and
perhaps you might make an appeal for MVP assistance in the
subject line.

good luck.
 
Rossz,

Having read your correspondence with Tina, I'll try to
guess what you've done / want to do, and throw in an idea,
in case it helps...

The obvious suggestion would be to (a) put in your input
form as many report buttons as the reports... kind of
messy, or (b) make the button open a further form to
choose the report you want. I suspect, though, I'm not
proposing something you haven't though of already, it's
just too obvious, but not what you want...

So, leaving the obvious behind, here starts the
guesswork... I assume you have already chosen the report
to be run in a previous step, and the report procedure
itself opens up the input form(s), so what you want is
THAT particular report to be executed once you've entered
your parameters, without the user having to re-choose it?
Well, if that's the case, I can think of a way or two to
it:

1. Add a hidden textbox on the input form
2. Make the procedure (macro or code) that opens the input
form store the report name in the hidden text box on the
form
3. The macro or code run from the "run report" button on
the input form can then read that text box and run the
specific report.

Alternatively, if all of this is handled by code, you
don't even need the text box on the form; all you need isa
global variable to hold the report name.

HTH,
Nikos
 
Back
Top