View Full Version : dynamically populating a combobox


reptar
10-26-2008, 05:10 AM
I have 3 tables: tbl_company, tbl_contacts, tbl_events. tbl_company is the parent table to tbl_contacts with clientID as their one-to-many relationship.
When tbl_company is on the first record, its clientID value = 1. I want to have a combobox in tbl_events which dynamically populates a list of firstnames from tbl_contacts when clientID =1.

Any ideas? or tutes?

Cheers

WayneRyan
10-26-2008, 11:55 AM
reptar,

Need more info, but generally speaking:


Me.YourCombo.RowSource = "Select FirstName " & _
"From tbl_contacts " & _
"Where clinetID = " & Me.ClientID
Me.YourCombo.Requery


The Me.ClientID is probably --> Forms!YourMainForm!ClientID

Also, use the Search Facility here and look for --> Cascading

You're not exactly setting up cascading combos, but the examples should
be helpful.

Wayne

reptar
10-26-2008, 07:10 PM
cheers, thanks