Form Filter

  • Thread starter Thread starter jdguy
  • Start date Start date
J

jdguy

I am learning my way around Access & have made a database to utilize data
from an old Lotus Approach database I have used for many years to track my
scale tickets for my farm. It would probably be easier to explain my example
by using more common terms. Let's say I wanted to track the sales of used
cars. I have several models & years on my lot. I would set up a table for
inventory info with the foloowing fields; model year, make, model, color,
etc. Then lets say you have an invoice table with fields; model year, model
(related to the inventory table), and various other fields. How would you
make an invoice input form where you enter the model year & the model field
would be a drop down list that is limited to the models specific to the year
you've just chosen in the first field.? Hope that is enough detail to get me
pointed in the right direction. Thanks in advance for any help.
 
Filter the row source query of the combo on the value of the text box where
you enter the year.

SELECT Model FROM tblVehicle WHERE ModelYear = Me.txtModelYear;

Then in the AFter Update event of the Model Year text box requery the combo.

If Not IsNull(Me.txtModelYear) Then
Me.cboModel.Requery
End if
 
Klatuu said:
Filter the row source query of the combo on the value of the text box where
you enter the year.

SELECT Model FROM tblVehicle WHERE ModelYear = Me.txtModelYear;

Then in the AFter Update event of the Model Year text box requery the combo.

If Not IsNull(Me.txtModelYear) Then
Me.cboModel.Requery
End if

Thanks for the reply. That is all way over my head at this point, but it
gives some direction & terms to search for. And that's what I was looking
for. I don't know where to enter the commands that you talk about. But I can
get schooled up on it, now that I have a clue about what to do.
 
Back
Top