Dynamic Results using Combo Boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm not really sure what I am doing is called, but essentially, I want to use
a pair of combo boxes to dynamically leverage my data. If combo box one
selects a certain item from table 1, I need combo box two to return all
related data from table 1. Example: If in Table 1 I have two fields: Team
and Task -- If combo box one selects a certain team, I want combo box two
to return the related task for that team only. Does that make sense? Any
and all suggestions would be greatly appreciated!
 
add a WHERE clause to the RowSource of combo box 2, as

WHERE TeamFieldName = Forms!FormName!ComboBoxOne

substitute the correct field, form, and combo box names, of course. (if the
RowSource is a query, add the WHERE clause directly to the query.)

hth
 
to complete that thought: add the following code to the first combo box
control's AfterUpdate event procedure, as

Me!ComboBoxTwo.Requery

again, substitute the correct name of the second combo box control.

hth
 
Tina -- Thank you for the response, however I am still having difficulty. I
know this is a fairly routine task to accomplish, but I just cannot figure it
out. Whenever I put in a WHERE statement into my rowsource or query,
ComboBoxOne returns a blank value. Any suggestions, or am In over my head?
 
put the WHERE clause in the second combo box's RowSource, not in
ComboBoxOne's RowSource.

hth
 
Back
Top