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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box insanity

Status
Not open for further replies.

stewartz

Technical User
Apr 5, 2002
2
US
I am making my first attempt at a database. It should be fairly simple but I am lost. I have 10 fields in a table of about 15,000 records. I want to be able to view a record by selecting one piece of data from a combo box and have that selection limit the choices in a second combo box. Upon selection of the item in the 2nd combo box I would like the data for that record to be displayed on the form. I have no no problems constructing the forms, and or queries. I have found a few instances of this question in different forums but they don't seem to work. (I'm sure it's the operator) If the fields in question are called "state" and "city" I would prefer to be able to select either one first but that is not absolutely necessary. I really need to be "walked" through this. Any help would be greatly appreciated. Thanks
 
Stewart,
the first step is to set the row source of the second combo box. An appropriate place to do this would be in the after update event of the first combo box. If you are not sure about the operators have a look here

To go to the record chosen in the second combo box enter something like this in the after update event of the second combo

Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst ("[Prnumber] = " & SecondComboBox.value)
Me.Bookmark = rs.Bookmark
rs.close

hth.
Cheers,
Ewen.
 
Could you be more specific please? Step-by-step. As I said, I could really use some "hand-holding" on this one. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top