By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,204 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,204 IT Pros & Developers. It's quick & easy.

Find Where Form Is Opened

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
"Steve" <no******@nomsense.comwrote in message
news:uO******************************@earthlink.co m...
>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",,,,,,,"frmCallingForm"

Fred Zuckerman
Sep 16 '08 #2

P: n/a
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********@sbcglobal.netwrote in message
news:ZB***************@nlpi068.nbdc.sbc.com...
"Steve" <no******@nomsense.comwrote in message
news:uO******************************@earthlink.co m...
>>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",,,,,,,"frmCallingForm"

Fred Zuckerman


Sep 17 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.