need help on combo box

dette

Registered User.
Local time
Tomorrow, 01:13
Joined
Oct 7, 2004
Messages
15
to anyone who can help me,

i have a subform named AsstAgency, which contains only one field named Assisting Agency, this is a combo box limited to list. this subform is set to Continuous form, so each record in the main form can have one or more Assisting Agency(ies). i want that if an agency is already chosen, it should not appear on the list if the user wishes to add another agency for the same record in the main form...i'm just a beginner so i hope u understand what i'm saying. =)

thank you in advance. =)
 
Dette,

Set the RowSource for the combo to:

Code:
.RowSource = "Select Agency " & _
             "From   Agencies " & _
             "Where  Agency Not In " & _
             "   (Select Agency " & _
             "    From   Agencies " & _
             "    Where  AgencyID = " & Me.AgencyID & ")"

You'll need to do a .ReQuery every time the main form
changes it's parent record AND every time the combo-box
is updated.

Wayne
 
at what event should i put that? thanks. =)
 

Users who are viewing this thread

Back
Top Bottom