Filter Help

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I am trying to set up a filter and it is not working
correctly. My form is tied to a table called contacts.
Each contacts record has a field called deleted(bit) which
is true/false. This allows users to delete the record
without really deleting from the database. I set the
filter to:

Deleted = 0

and then in the form On_Load code i added,

Me.FilterOn = True

The records with deleted = 1 still show up.

Thanks!
 
-----Original Message-----
I am trying to set up a filter and it is not working
correctly. My form is tied to a table called contacts.
Each contacts record has a field called deleted(bit) which
is true/false. This allows users to delete the record
without really deleting from the database. I set the
filter to:

Deleted = 0

and then in the form On_Load code i added,

Me.FilterOn = True

The records with deleted = 1 still show up.

Thanks!
.
In the On Load event of the form try adding this
Me.FilterOn = False
Me.Filter = "[Deleted] = " 0
Me.FilterOn = True
 
-----Original Message-----



.
Better yet, base the form off a query instead of a table,
then put 0 in the criteria field of Deleted.

Also when a yes/no check box is checked the value is -1
not 1
 
I am trying to set up a filter and it is not working
correctly. My form is tied to a table called contacts.
Each contacts record has a field called deleted(bit) which
is true/false. This allows users to delete the record
without really deleting from the database. I set the
filter to:

Deleted = 0

and then in the form On_Load code i added,

Me.FilterOn = True

The records with deleted = 1 still show up.

Thanks!

Try setting the filter in the OnLoad event also.

Me.Filter = "Deleted = 0"
Me.FilterOn = True

If this is the only thing you are using the form for then you might
set the field in recordset to 0 - or False.

- Jim
 
Back
Top