473,890 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2301
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.ActiveFo rm.Form![Casual Factors] = "Consequenc es 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
1524
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 parent opening window. I have managed this when I know the name of the parent window - however there are two or three different 'parent' forms with different form names that could reference this popup session meaning my current solution only...
1
2207
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 for ", where event name is the name of the event for which the user wants to add a year. The event names are all different lengths and sometimes when the form pops up the caption is truncated with the ellpsis(...) Is there a way to determine how...
2
442
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 that includes the Global.asax assembly. I've tried reflection, but I can't seem to make it work correctly. Does anyone have any ideas how I can make this happen? Thanks,
3
1215
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 (http://www.grisoft.com).
5
1816
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 -- Response.Redirect("MyPage.aspx"); 2) Constants -- Response.Redirect(STRMyPage); // where input parameter is -> const string STRMyPage = "MyPage.aspx"; 3) Something entirely differnent?
7
1602
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 advance. W
1
1707
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
5117
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 another part in a standard (i.e. Arial) font. How do I go about doing this? It is probably an an override of the standard form or a custom draw routine for the caption.
0
2574
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 the button... I get silly errors like: 1119: Access of possibly undefined property _x through a reference with static type Class. this is my code which is in the first frame of the timeline. I have a button LeftKnee and the caption...
0
9978
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...
0
9822
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11232
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10819
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10923
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,...
1
8016
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
7169
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
5851
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...
2
4271
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.