473,387 Members | 1,899 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 a toolbar combo box in MS Access

Is there a way to determine the value of a combobox that resides in a
toolbar other than using CommandBars.ActionControl? I want a user to
be able to change the combobox and be able to refer to the selected
value later, not immediately, and without having to set a public
variable.
This refers to the toolbar when adding a combobox to the toolbar:
CommandBars("myToolbarName").Controls.Add(Type:=ms oControlComboBox)
But what referes to the combobox once it's created?
Any help is appreciated.
LQ
Nov 12 '05 #1
1 3415
I found a way to do this for anyone who had the same question:

'***START CODE***
Dim objBar As CommandBar, objCbo As CommandBarComboBox, myIndex As Integer
Set objBar = Application.CommandBars("myToolbarName")
Set objCbo = objBar.Controls("myComboName")
myIndex = objCbo.ListIndex
Set objCbo = Nothing
Set objBar = Nothing
'***END CODE***

la*************@hotmail.com (Lauren Quantrell) wrote in message news:<47**************************@posting.google. com>...
Is there a way to determine the value of a combobox that resides in a
toolbar other than using CommandBars.ActionControl? I want a user to
be able to change the combobox and be able to refer to the selected
value later, not immediately, and without having to set a public
variable.
This refers to the toolbar when adding a combobox to the toolbar:
CommandBars("myToolbarName").Controls.Add(Type:=ms oControlComboBox)
But what referes to the combobox once it's created?
Any help is appreciated.
LQ

Nov 12 '05 #2

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

Similar topics

11
by: N. Graves | last post by:
I have checked the "Alignment and Sizing" toolbar but when I want to use in on aligning several form object the toolbar buttons stay grayed out. What am I missing. Thanks! N. Graves
2
by: Rooksarii | last post by:
Hello folks, Let me first apologize for any impropper terminology I may use as I am presently trying to broaden my Office knowledge by diving into Access head on. My specific problem is this....
13
by: cefrancke | last post by:
I have a custom toolbar for users during any preview of a report launched by a button click on a form. I would like to add a toolbar button to launch the Print Dialog (like 'Ctrl-P' or...
0
by: rammohan | last post by:
how can we place combo box on tool bar in c# windows application. my idea is to place combo boxes on tool bar and place some toolbar buttons rightside to the comboboxes.
4
by: John Tyce | last post by:
I am trying to convert an SDI application to MDI. I had a from with many controls on it that was an SDI application. The form is really big and requires the user to scroll back and forth and up and...
1
by: none | last post by:
hiho@ll i want to make a IE Toolbar which has a newsticker built in the problem i have is i don't really know how to use static text in a toolbar? the second question will be, how can i change...
6
by: Juan Pedro Gonzalez | last post by:
I wanted to add a Combobox to a toolbar... Kind of the look you get on VisualStudio's toolbar. I've been able to find some VB 6 samples, but the placeholder option is no longer available for...
62
by: Ecohouse | last post by:
I was just wondering if there was any way to use a toolbar in Outlook 2002 in Access 2002? I want to create a custom toolbar in Access similar to the Calendar toolbar in Outlook. Any ideas?
7
by: jundavid | last post by:
have a form and a subform. In the subform, I have a combo box which I would like to only show the records based on the control on the main form. Let say I have a record of employees which I would...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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.