dynamically populating a combobox (1 Viewer)

reptar

Registered User.
Local time
Today, 09:10
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
 

WayneRyan

AWF VIP
Local time
Today, 17:10
Joined
Nov 19, 2002
Messages
7,122
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
 

reptar

Registered User.
Local time
Today, 09:10
Joined
Jul 4, 2005
Messages
32
cheers, thanks
 

Users who are viewing this thread

Top Bottom