Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

How to determine the calling Form?

I am using Access 2002 and 3.6 DAO Engine.

OK I am implementing a feedback/suggestion button in each form so new users of this DB can make comments on the data entry forms.  How do I capture the name of the calling form?  In other words when they press the button in any form, I need to know what form they where on, so I can record that information.

Cheers!
Nikodemos2
0
Nikodemos2
Asked:
Nikodemos2
  • 2
1 Solution
 
jadedataMS Access Systems CreatorCommented:
Hey Nikodemos2!

 Use the OpenArgs parameter of the OpenForm command to pass the calling form to the called form.
 (I do this on all form opens to force a return from the called form BACK to the calling form in the onClose event.)

 docmd.openform "formname",,,me.name

Jack
0
 
kenspencerCommented:
Hi,
A simple way, although probably not the most efficient, is to have a global variable that is populated when the button is pressed.  Without knowing how your application is set up, it is hard (for me) to suggest something smoother.

Ken
0
 
Nikodemos2Author Commented:
Grassshopper thanks you again Master Jack!
0
 
jadedataMS Access Systems CreatorCommented:
and speaking of variables....
  in the declarations of the form
  dim OpenedBy as String


In the Form_Open
  OpenedBy = me.openargs

this holds the value of the openargs even thru an error event where I've seen OpenArgs get vacated by a code abend.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now