Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to determine the calling Form?

Posted on 2003-12-03
4
Medium Priority
?
370 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

660 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