Solved

How to determine the calling Form?

Posted on 2003-12-03
4
365 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

630 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