dynamically populating a combobox

reptar

Registered User.
Local time
Yesterday, 21:50
Joined
Jul 4, 2005
Messages
32
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
 
reptar,

Need more info, but generally speaking:

Code:
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
 
cheers, thanks
 

Users who are viewing this thread

Back
Top Bottom