Filter information from a combo box to a combo box

  • Thread starter Thread starter Oscar R
  • Start date Start date
O

Oscar R

I have a equipment table(EqID,Descr,location,etc)and a equipment fixed
table(JobID, empoyee, Location, EqDesc,etc) what i need to do is select in a
form from a combo box the location(already have) and select from another
combo box the equipment linked to the location filed, can some one help me
please
 
If I understand your question correctly, you need to use cascading combos.
So what you are saying is I want to select a location then select a piece of
equipment at that location, but in the Equipment combo, I only want to show
equipment at that location in the Equipment combo.

The technique is to create a query as the row source for the equipment combo
that is filtered on the location combo. Like:
SELECT EqID, Descr FROM tblEquipment WHERE location = Me.cboLocation

Then, in the After Update event of the Location combo, requery the Equipment
Combo:

Private Sub cboLocation_AfterUpdate()

Me.cboEquipment.Requery
 
Back
Top