Filter Question

G

Guest

I have a form that I need to filter on two different fields and am having
trouble doing this.

On the first form, I have a command button. When you click this command
button, I want to bring up a second form that is filtered to the pull only
the information for the [Division] and [Element Number] fields matching the
[Division] and [Element Number] fields in the first form.

At this time, I have it filtering by [Division]. It works up to the point
that it only pulls that division's information. However, it pulls every
element number for that division, of which there are 12. If I change the
button to filter on [Element Number] it pulls up only that element number,
but it pulls for every division.

Is it possible to filter on two fields? Thank you in advance!
 
C

Casey via AccessMonster.com

Try following the tutorial's on this website, it will work wonders for you

http://www.fontstuff.com/access/acctut18.htm
or
http://www.fontstuff.com/access/acctut19.htm

I have a form that I need to filter on two different fields and am having
trouble doing this.

On the first form, I have a command button. When you click this command
button, I want to bring up a second form that is filtered to the pull only
the information for the [Division] and [Element Number] fields matching the
[Division] and [Element Number] fields in the first form.

At this time, I have it filtering by [Division]. It works up to the point
that it only pulls that division's information. However, it pulls every
element number for that division, of which there are 12. If I change the
button to filter on [Element Number] it pulls up only that element number,
but it pulls for every division.

Is it possible to filter on two fields? Thank you in advance!
 
G

guido via AccessMonster.com

You can filter on multiple fields. This can be done easily upon opening a new
form.
example: DoCmd.OpenForm "Form2", , , "[Division]=" & varDiv & " And [Element
Number]=" & varElement
 

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