filter a form using a seperate form.

  • Thread starter injanib via AccessMonster.com
  • Start date
I

injanib via AccessMonster.com

I can creat a search field on a form to filter records based on a certain
field data. I would like to be able to do this on two different forms,
meaning my search button will be on a different form than the one it applys
filter to. I do not know how to reference the form I need to apply filter to.
Can some one give me an idea. I just need a simple example. Regards.
 
G

Guest

To reference another form's Filter property:
Forms!FormName.Form.Filter = "?"

Once you set the Filter property you should set the FilterOn property:
Forms!FormName.Form.FilterOn = True

Note: The form (FormName) must be open for this to work!

Steve
 
I

injanib via AccessMonster.com

My bad! Let me explain exactly what I want to acomplish.

I have a form called PrintForm that only contains two buttons.
(Print Today's Report) and (Print Other Report).

I want to set the on click property of the first button to apply a filter to
another form based on a date field and open the report with that filter
applied.

and the second button upon click should ask to enter "Manifest Number" and
then match that number with the Manifest Numbers in another form and filter
it for that Manifest number and then open the report with that filter applied.


it is a long story why the buttons are on a separate form, although
inconvinient, it has to be that way.

I hope my explaination is clear. I greatly appriciate your input.
 

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