Form Filter should work, but it does not

D

Dennis

All,

I've read the filter related discussions and followed their instruction, but
my filter does not work.

I have a form based a query. The query is just a logical view of the file
without any sort or selection / filter criteria.

For testing purposes, I changed my form's query to have a selection criteria
of 1 for the Customer number field. The I looked at the query in SQL view
and copied the criteria. The SQL criteria is

WHERE (((Computers.CustAcctNo)=1))

I then put above line in the Form's Filter Property and set the AllowFilter
to Yes.

This is not work. I then change my form record source from the query to the
table and that did not work.

I also put the following code in the Form Open event on the form:

Me.Form.Filter = "(([Computers].[CustAcctNo])=1)"
Me.Form.AllowFilters = True
Me.Form.Requery

This did not work. There are 25 row in the table and only three should show
when I apply this criteria. Also, the word filter should show by the
navigation buttons and it does not.

Any suggestions. I know it is something dumb, but I don't see it.

Thank you for your assitance.
 
R

ruralguy via AccessMonster.com

Assuming the CustAcctNo field is numeric try:
Me.Filter = "[CustAcctNo]=1"
Me.FilterOn = True

If it is text then:
Me.Filter = "[CustAcctNo] = '1'"
Me.FilterOn = True
All,

I've read the filter related discussions and followed their instruction, but
my filter does not work.

I have a form based a query. The query is just a logical view of the file
without any sort or selection / filter criteria.

For testing purposes, I changed my form's query to have a selection criteria
of 1 for the Customer number field. The I looked at the query in SQL view
and copied the criteria. The SQL criteria is

WHERE (((Computers.CustAcctNo)=1))

I then put above line in the Form's Filter Property and set the AllowFilter
to Yes.

This is not work. I then change my form record source from the query to the
table and that did not work.

I also put the following code in the Form Open event on the form:

Me.Form.Filter = "(([Computers].[CustAcctNo])=1)"
Me.Form.AllowFilters = True
Me.Form.Requery

This did not work. There are 25 row in the table and only three should show
when I apply this criteria. Also, the word filter should show by the
navigation buttons and it does not.

Any suggestions. I know it is something dumb, but I don't see it.

Thank you for your assitance.
 

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