Filter Button on Form??

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

Guest

I have a form that is used to scroll back and forth between records of construction vehicles. One of the fields for these records is "V-DESCRIPTIONID" and contains entries such as 4x2 Pick-Up, Bucket Truck, Stake Body, etc. Several vehicles in the database have the same description and thus the same "V-DESCRIPTIONID". I want to have a button on my form that, when clicked, will filter the records according to the "V-DESCRIPTIONID" of the record that is currently being displayed. After clicking the button I want to be able to scroll only through vehicles whose "V-DESCRIPTIONID" matches that of the originally displayed record. I have limited knowledge of expressions and code......so any help is much appreciated. Thanks.

TPE
 
Justin,

Thanks, works great......but how about a button to
turn the filter back off??

TPE
-----Original Message-----
Use the docmd...

Screen.PreviousControl.SetFocus
DoCmd.RunCommand acCmdFilterBySelection
between records of construction vehicles. One of the
fields for these records is "V-DESCRIPTIONID" and
contains entries such as 4x2 Pick-Up, Bucket Truck, Stake
Body, etc. Several vehicles in the database have the
same description and thus the same "V-DESCRIPTIONID". I
want to have a button on my form that, when clicked, will
filter the records according to the "V-DESCRIPTIONID" of
the record that is currently being displayed. After
clicking the button I want to be able to scroll only
through vehicles whose "V-DESCRIPTIONID" matches that of
the originally displayed record. I have limited
knowledge of expressions and code......so any help is
much appreciated. Thanks.
 
Back
Top