473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Referencing the Caption of a Custom Popup in VB


I have a custom Access menu with sub-menus and sub-sub-menus. (220
items). Right now I have created 220 Functions and attached each
individual Function to the specific OnAction property. The Functions
return Text which is the same as the Caption of the sub-sub-menu items.
I would like to reference the Custom Popup Caption of these
sub-sub-menus and pass it through one Function for input in a form.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
2 2247
Hi, Sean.

220 custom functions are a *lot* of functions to maintain. Are you using
user-defined functions or Macros to automate this custom menu? Macros are
often used in creating custom menus, but Macros don't allow for error
handling. User-defined functions not only allow for error handling, but can
help streamline similar functionalities into a smaller total number of
functions, making the application easier to maintain.

You may be interested in the step-by-step tutorial on adding a custom button
to the menu bar, which includes a sample database that contains source code
for user-defined functions. Please see the "How to add a custom button on
the command bar to run code on a form" tutorial on this Web page:

http://www.Access.QBuilt.com/html/fo...l#CustomCmdBar

There's also an example of the source code needed to reference menu items
and sub-menu items on this Web page:

http://www.Access.QBuilt.com/html/vb...SetMacroSecLvl

You'll need to set a Reference to the Microsoft Office library for your
version of Office in order to use the CommandBar code.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that
a message will be forwarded to me. Spammers who use my UNALTERED
reply E-mail address will only satisfy the SpamEater's hunger.)
"Sean Mullaly" <s.*******@opg.com> wrote in message
news:41**********************@news.newsgroups.ws.. .

I have a custom Access menu with sub-menus and sub-sub-menus. (220
items). Right now I have created 220 Functions and attached each
individual Function to the specific OnAction property. The Functions
return Text which is the same as the Caption of the sub-sub-menu items.
I would like to reference the Custom Popup Caption of these
sub-sub-menus and pass it through one Function for input in a form.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2

I'm using the menu as a data source for input on a form.
eg:
Public Function CF_001()
On Error GoTo Menu_Err
Screen.ActiveForm.Form![Casual Factors] = "Consequences of potential
error not discussed before starting work"
Menu_Exit:
Exit Function
Menu_Err:
Resume Menu_Exit
End Function
The menu item with the OnAction function CF_001() has a caption that is
identical to the value I am passing to the bound box (Casual Factors) on
the active form. If I could reference the menu item caption, then I
could pass the value of that string through one gobal function for input
into my active form.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

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

Similar topics

4
by: Randell D. | last post by:
Folks, I have a javascript function which is a popup - It contains a list in form tags - When the user selects a value in the popup, and clicks submit, I want the values to be transfered to the...
1
by: Colin Ward | last post by:
Hi. I have a popup modal form which gets part of its caption from code. The part of the caption which is determined from code is the name of the event. For example the caption would be "Add Year...
2
by: Ron | last post by:
I need to write a custom textbox control that references an object located in the Global.asax class, but I can't compile the control into a DLL without including the reference to the project DLL...
3
by: starbuck | last post by:
Hi Is it possible to replace the standard floating menu with a custom one? Thanks in advance --- Outgoing mail is certified Virus Free, so am I. Checked by AVG anti-virus system...
5
by: Amelyan | last post by:
I am struggling here trying to determine what is a good programming practice as far as referencing your URLs. When you use Response.Redirect, do you use 1) Hard-coded string --...
7
by: Wally | last post by:
Hi all. Is there a way to retrieve captions of system buttons (i.e: Ok, Yes, No, Cancel, Abort, Retry, Ignore that, for italian o.s. are Ok, Si, No, Annulla, Esci, Riprova, Ignora)? Thanks in...
1
by: Daniel Friend | last post by:
How do I add a custom button to the caption bar of a form like AOL does for it's favorites. Thanks, Dan
2
by: eljainc | last post by:
Hello, I would like my program to display the caption on the form (top of form on title bar) in a different font. I would ideally like to have one part of the form caption in one font, and...
0
karlectomy
by: karlectomy | last post by:
Hey all, I Just installed Flash CS3 and was rearing to get animating when I caught a snag... Actionscript 3.0 is NOT Actionscript 2.0... I want to make a popup caption when I do a rollover of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.