473,576 Members | 3,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating Combo Boxes (post-Selection)

I have 3 tables of information feeding into 4 combo boxes on my main
form (DR Form). I have as many list boxes (acting as text boxes) as
there are fields in each one of the 3 tables. Once selecting from the
combo box, I have all the combo boxes, using afterupdate, populating
their respective list boxes. These text boxes are directly correlated
to the combo box selection using SQL. Here is an example from the
afterupdate event in the sub cboServer_Click :

lstServername.R owSource = "Select [Server Name] From [Server List]
Where [Server List].[Server Name] = '" & Me.cboServer & "';"

So when I select something from 1 of the combo boxes, say cboServer
(where I have server names listed), the information in the other 3
combo boxes decrease and get specific to holding only the information
tied to that specific selected Server.

Now, when I select from one of the combo boxes, how do I get the
remaining unselected combo boxes to display the first instance that
can be chosen (instead of having the user select from the combo box to
display the one they want), disregarding whether or not they have 1 or
multiple instances to choose from?

Aug 1 '07 #1
2 3263
To have the first item in a combo box's Row Source be "showing" as already
selected in the combo box, this generic code will do:]

Me.ComboBoxName .Value = Me.ComboBox.Ite mData(0)

--

Ken Snell
<MS ACCESS MVP>
"Dave" <dj*******@gmai l.comwrote in message
news:11******** *************@k 79g2000hse.goog legroups.com...
>I have 3 tables of information feeding into 4 combo boxes on my main
form (DR Form). I have as many list boxes (acting as text boxes) as
there are fields in each one of the 3 tables. Once selecting from the
combo box, I have all the combo boxes, using afterupdate, populating
their respective list boxes. These text boxes are directly correlated
to the combo box selection using SQL. Here is an example from the
afterupdate event in the sub cboServer_Click :

lstServername.R owSource = "Select [Server Name] From [Server List]
Where [Server List].[Server Name] = '" & Me.cboServer & "';"

So when I select something from 1 of the combo boxes, say cboServer
(where I have server names listed), the information in the other 3
combo boxes decrease and get specific to holding only the information
tied to that specific selected Server.

Now, when I select from one of the combo boxes, how do I get the
remaining unselected combo boxes to display the first instance that
can be chosen (instead of having the user select from the combo box to
display the one they want), disregarding whether or not they have 1 or
multiple instances to choose from?

Aug 1 '07 #2
On Aug 1, 4:21 pm, "Ken Snell" <kthsneisll...@ ncoomcastt.rena etl>
wrote:
To have the first item in a combo box's Row Source be "showing" as already
selected in the combo box, this generic code will do:]

Me.ComboBoxName .Value = Me.ComboBox.Ite mData(0)

--

Ken Snell
<MS ACCESS MVP>

"Dave" <djwest...@gmai l.comwrote in message

news:11******** *************@k 79g2000hse.goog legroups.com...
I have 3 tables of information feeding into 4 combo boxes on my main
form (DR Form). I have as many list boxes (acting as text boxes) as
there are fields in each one of the 3 tables. Once selecting from the
combo box, I have all the combo boxes, using afterupdate, populating
their respective list boxes. These text boxes are directly correlated
to the combo box selection using SQL. Here is an example from the
afterupdate event in the sub cboServer_Click :
lstServername.R owSource = "Select [Server Name] From [Server List]
Where [Server List].[Server Name] = '" & Me.cboServer & "';"
So when I select something from 1 of the combo boxes, say cboServer
(where I have server names listed), the information in the other 3
combo boxes decrease and get specific to holding only the information
tied to that specific selected Server.
Now, when I select from one of the combo boxes, how do I get the
remaining unselected combo boxes to display the first instance that
can be chosen (instead of having the user select from the combo box to
display the one they want), disregarding whether or not they have 1 or
multiple instances to choose from?- Hide quoted text -

- Show quoted text -
I'm much obliged. Thank you!

Dave

Aug 2 '07 #3

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

Similar topics

2
1890
by: Derk | last post by:
I have to write a web page wht three combo boxes, all three are to be populated from a database. - there tables = Bulidings, Floors and Offices The user will choose a 'Building' from the first combo, once it has been selected, I need to populate the second combo box with the 'floors' of that selected building. The user will then select the...
1
2941
by: Jeff_F | last post by:
Hi all. Question in two parts. I'm looking to add two combo boxes. The first will contain regions and the second will contain employee names which correspond to the region selected in the first combo box. What is the most efficent way to go about this type of layout - in terms of code and populating the combo box??? thx.
2
3052
by: visionstate | last post by:
Hi there, I am working on a form that uses 3 text boxes and 3 combo boxes. When any data is entered into any of these, I click a command button and this requeries a sub query in the form and displays data dependent on what has been typed in. After having trouble with populating my second combo box (I eventually populated it by putting the...
0
956
by: heimdal | last post by:
I am new to VB. I have created a combo box in Visual Basic 2005 Express. I created this by dragging a field from a datasource across to the form as a combo box. However when I run the form I get a single value only in the combo box rather than a list of all the values in that column of the datasource.
3
2894
by: Phil | last post by:
I've posted this a few times without any luck, hoping for some fresh ideas on this. I'm pretty certain this can be done. I've been using a micrsoft template to create a supplier database called the Inventory management database, I have changed this so that there is a link in the relationships with the suppliers so that every product entered...
2
2278
by: SPOILED36 | last post by:
I am building a database to track attendance. I have one main form with multiple subforms. Within one of the subforms name sfrDailyAttendance, I also have cascading combo boxes (cboCategory and cboException) to filter difference absences (ie.Regular, Overtime, etc). cboCategory is filtered as follows: !!... Because I have the subform set...
11
3045
by: jgoodnight | last post by:
Hi, I have a form with three combo boxes: Area, Sub-Area, and Factor. I've set up the Sub-Area combo box to list only those areas that are part of the selected area. I've set up the Factor combo box to list only those factors that are part of the selected sub-area. For example, if I select area 1.0, the Sub-Area combo box displays 1.1, 1.2,...
2
1394
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
We have many many systems (accounts) which we need to search on. What my initial Idea is to have a ComboBox1 populated w/ a list of all systems at load (from Oracle table). Done and quick But, step two, I want to populate ComboBox2 depending on the System selection from ComboBox1 . But, the problem is, I can load the list of 'Systems'...
3
1298
by: PuddinPie | last post by:
Hello, Iím kind of new to Access 97 so please bear with me. I have a form with four combo boxes linked to a union query. Itís a start date, end date, User, and system What I am trying to do is, by there selections in the combo boxes I want to use the query to populate a report with the matching information. All the combo boxes are...
0
8121
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. ...
0
8286
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...
1
7869
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...
0
8143
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...
1
5664
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...
0
5340
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...
0
3797
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1385
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1107
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...

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.