Solved

How to determine the calling Form?

Posted on 2003-12-03
4
321 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
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
jadedata earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Grassshopper thanks you again Master Jack!
0
 
LVL 32

Expert Comment

by:jadedata
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now