473,761 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find Where Form Is Opened

I am working on a very large database that has a main menu, many sub-menus
and a few sub-sub-menus. These menus typically have many command buttons
that open forms and reports in the database. Forms and reports may also be
opened from command buttons on some of the forms.
1. Is there any way to programatically determine where a sub-menu or
sub-sub-menu is opened from? The code would need to reveal the name of the
menu and the name of the command button.

2. Is there any way to programatically determine where a specified form
is opened from? Again, the code would need to reveal the name of the menu
and the name of the command button.

Thanks!

Steve
Sep 16 '08 #1
2 1634
"Steve" <no******@nomse nse.comwrote in message
news:uO******** *************** *******@earthli nk.com...
>I am working on a very large database that has a main menu, many sub-menus
and a few sub-sub-menus. These menus typically have many command buttons
that open forms and reports in the database. Forms and reports may also be
opened from command buttons on some of the forms.
1. Is there any way to programatically determine where a sub-menu or
sub-sub-menu is opened from? The code would need to reveal the name of the
menu and the name of the command button.

2. Is there any way to programatically determine where a specified form
is opened from? Again, the code would need to reveal the name of the menu
and the name of the command button.

Thanks!

Steve
Check out the OpenArgs property.
As in:

DoCmd.OpenForm "frmsubForm",,, ,,,,"frmCalling Form"

Fred Zuckerman
Sep 16 '08 #2
Fred,

Thanks for the quick response!

I am not looking for how to program it in! I am looking for some code that
will return that
DoCmd.OpenForm "frmsubForm "
is in the click event of cmdbutton cmd1007 on the menu FrmMyMenu.

Thanks!

Steve
"Fred Zuckerman" <Zu********@sbc global.netwrote in message
news:ZB******** *******@nlpi068 .nbdc.sbc.com.. .
"Steve" <no******@nomse nse.comwrote in message
news:uO******** *************** *******@earthli nk.com...
>>I am working on a very large database that has a main menu, many sub-menus
and a few sub-sub-menus. These menus typically have many command buttons
that open forms and reports in the database. Forms and reports may also be
opened from command buttons on some of the forms.
1. Is there any way to programatically determine where a sub-menu or
sub-sub-menu is opened from? The code would need to reveal the name of
the menu and the name of the command button.

2. Is there any way to programatically determine where a specified
form is opened from? Again, the code would need to reveal the name of the
menu and the name of the command button.

Thanks!

Steve
Check out the OpenArgs property.
As in:

DoCmd.OpenForm "frmsubForm",,, ,,,,"frmCalling Form"

Fred Zuckerman


Sep 17 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
281
by: Marcin Floryan | last post by:
Hello! My question regards opening (and re-opening) Form and the Load event. I have a main form (frmMain) and I also have a data form (frmData). In the main form I have created: Private fData as new frmData()
7
7226
by: a s i l b a . p t | last post by:
Can someone please explain why the following code raises error 2450?... Note: frmTest is a simple form with code behind form so it can be instantiated through the form's class module. Public Sub sbTest() On Error GoTo errHandler Dim frm As Access.Form
3
6225
by: Randy | last post by:
I have been able to set up a Find Record Button on my switchboard to take me to a form with the correct case number by using a parameter query and macro. When I try to run the Find Record button from the macro on the form I want to find the record in it just sits there and does not run. Could someone tell me how to fix this? Please be specific as I am new to Access.
8
14127
by: Cheryl | last post by:
How can I create a button that would take me back to the previous form not the previous record, but the previous form that I just moved from using VBA? Any sample code would be greatly appreciated.
3
6825
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records. The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event...
8
13528
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the docmd.openreport as follows DoCmd.OpenReport stDocName, acPreview, , strWhere where strWhere is a string dependant on the choices the user makes in the
6
2883
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox and the coresponding 'Id' from the lookup table is to be inserted into the field of the new record. I have two simple tables. "tblPerson" is the data table. The lookup
1
1940
by: Amir Steta | last post by:
i am using one aspx.net form to enter data. it is opened as a popup window (lets call it dataentry.aspx) on w=760 and h=400. from this page i allow opening new aspx.net form (searchdata.aspx) to check already entered data. it is opened as new popup window on w=450 and h=550. i am passing values from this form (searchentry.aspx) back to first one by using server.transfer. when do this it passes values but window (for dataentry.aspx) stays...
1
3564
by: Mohit | last post by:
Hi all, I am working on a windows based client server application with multiple forms. All forms are having custom title bars with no default bars. There is one main form. Some forms are opened up as modal while others are opened up as modeless on this main form. Whenever some error occurs in client server communication we show it in modal message box. Now I ran into a case: a modal form is opened up on the main form. And some error...
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.