Solved

How to determine the calling Form?

Posted on 2003-12-03
4
361 Views
Last Modified: 2011-09-20
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
Comment
Question by:Nikodemos2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
jadedata earned 125 total points
ID: 9868370
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
 
LVL 3

Expert Comment

by:kenspencer
ID: 9868396
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
 

Author Comment

by:Nikodemos2
ID: 9868436
Grassshopper thanks you again Master Jack!
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9868480
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question