List box

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

Guest

I have a form with a combo box and list box. When I select a department from
the combo box I want all the machine numbers from that department to be in
the list box. Right now all the machine numbers are in the list box but I
would like only the machine numbers that are in the department that is in the
combo box to be shown. I have no idea how I would go about doing this. Any
suggestions?

Thanks in Advance
 
You are going to have to Use the Change Event for the Combo box to reset the
Source for the ListBox.

Just create a variable in your Combo box Change event and build the
appropriate SQL statement based on the value in the combo box (Copy and Past
the from the rowsource of your current listbox to get started).

Last, just set the Listbox.RowSource to the variable you just built.

Mike
 
Back
Top