Filter Button on Form??

T

TPE

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
 
J

Justin

Use the docmd...

Screen.PreviousControl.SetFocus
DoCmd.RunCommand acCmdFilterBySelection
 
T

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top