Name of form that invoked report

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

How do I find the name (in code) of the form that
issued the DoCmd OpenReport?

Me.Parent.Name doesn't seem applicable, but I
can't find the conceptual equivalent.

Thanks,
Bill
 
Bill said:
How do I find the name (in code) of the form that
issued the DoCmd OpenReport?

Me.Parent.Name doesn't seem applicable, but I
can't find the conceptual equivalent.

Thanks,
Bill

In the newest version you can pass the form name as an OpenArgs argument to
the report. Otherwise there is no way to do it that is built in.
Screen.PreviousControl.Parent perhaps?
 
It seems I'm forever bumping my head on the lack of
OpenArgs in O2K.... Sigh!

Anyway, the Screen.PreviousControl.Parent fails. If I
put the calling form's name in a non-visible control in
the invoking form, what's the syntax for referencing
that control from the reports code-sheet?

OR

Perhaps I could test to see if the form is open? Which
it would be if it was the invoking form.

Bill
 
This is one of the situations where a public global variable can be used.
Have your form set the variable to the form's name just before calling the
report, then have the report read that variable when needed.
 
Thanks Ken, that's what I ended up doing.

Even though my clients are generally at Office 2000,
can they in addition to that download a FREE copy of
the Office 2002 executer and run a front-end
back-end mde that was created with Office 2002?

I would really like to upgrade my development to at
least Office 2002.

Bill
 
I am not familiar with an "Office 2002 executer"?

There is no free "exe" or "runtime" software for ACCESS 2002. If you want to
use ACCESS 2002 features, and your clients don't have 2002, your only option
is to purchase Office XP Developer Edition so that you'll have a runtime
license for ACCESS 2002, and you then can package your application for
installation on clients' PCs. However, note that a runtime version of ACCESS
does not always exist well with other full installations of ACCESS, so you
might see some problems if the clients retain ACCESS 2000 on their machines.

--

Ken Snell
<MS ACCESS MVP>
 
Ken,
Sounds like a monumental bag of snakes to me. Thanks
for the information, I'll store that under "Things one
probably doesn't want to do".

By the way, did you see my post about "Force a blank
page"? Access Help is a little vague about how to do that
and I haven't found how to do that in the OnPrint for the
header.

Bill
 
Back
Top