cascading combo boxes in Access 2007

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

Guest

I want to have the drop-down list in ComboNAICSSecondLevel be dependent on
the choice made in ComboNAICSGeneral. After the first choice is made, the
second combo box's drop-down is blank.
Here is my code
Private Sub ComboNAICSGeneral_AfterUpdate()
Me.ComboNAICSSecondLevel.RowSource = "SELECT 2007NAICSTitle, 2007NAICSCode,
BusCategory FROM tblNAICS WHERE 2007NAICSCode Not Like ?? And 2007NAICSCode
Not Like ??-?? And BusCategory =
Left(Forms!frmClientServices!ComboNAICSGeneral),2 ORDER BY 2007NAICSTitle;"
Me.ComboNAICSSecondLevel = Me.ComboNAICSSecondLevel.ItemData(0)
End Sub
 
Back
Top