Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Using 5 Combo Boxes and 1 Text Box

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
There are 5 Combo Boxes (CB ?), 1 Text Box (T1), 6 Tables and 1 Query. The 6
Tables make up the query.
I want to make a selection from CB1, then CB2 only drops relevant data from
what was selected in CB 1. Make selection from CB2 and CB3 only drops
relevant data from what was selected in CB2. Make selection from CB3, then
CB4 only drops relevant data from selection of CB 3, also it is only
possible for T1 to have one answer from the combination of the selections of
CB1, CB2 and CB3.
When selection is made from CB4, then CB5 only drops relevant data of CB4.
I used SQL and Visual Basic (VB). Data is selected from CB1, and does
requery for CB2 (VB), CB2 Selects a Distinct Row (SQL) and does requery for
CB3. When I try the same thing for CB3, CB3 has data to select, after
selecting, no data appears in CB4. Can this system only work with 3 Combo
Boxes and if so, how do I make it work for the 5 Combo Boxes and also place
the data in Text Box T1?

The purpose for the Combo Boxes and Text Box is to provide an answer to a
query.
The First Combo Box lists Tools - Drill, Hammer Drill, Saw, Circular Saw,
Chain Block, etc; I select Drill.
The second Combo Box lists the Components for the Drill- Switch, Chuck,
Lead, Plug, etc; I select Chuck.
The Third Combo Box lists the Parts for the Component - Contact, Spring,
wedge, key, etc; I select Spring.
The Text Box provides the only Supplier who provides the Spring for the
Drill Chuck. This is the only possible answer that could appear in the Text
box due to the Relationship within the Tables.
The Forth Combo Box lists the Fault of the Parts - Shorted, Burnt, Broken,
etc;
The Fifth Combo Box lists the Fix - Repaired, Cleaned, Renewed, etc;
All worked well up to the third Combo Box, then no Dropdown list appears for
the Forth and Fifth Combo Box, this is why I suspect this method can only go
as far as three Combo Boxes. Also, I did not know how to have the Text Box
display the Supplier after Spring was selected in the third Combo Box.
I would appreciate any further assistance.
Regards,
kevsim
 
This method can work for as many levels as you can set the criteria in the combobox. If you can write the select statement then it can be done.
I do wonder if you have considered using the the tree view control for this particular form. It seems idea for the flow of data you described and I think your users would find it more user friendly.
good luck
 
Use a select statement in the dependent ComboBox to load according to the selection of the previous ComboBox.

ComboBox2.Controlsource = Select [FieldName] from TableName where [FieldName] = ComboBox1

mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top