Filter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Newbie here.

In my form, I have a field called Status. I have approximately 150 records.
Some of the records have a Status like "Follow Up", "Closed", and some have
NO Status at all.

I setup a procedure for this form to happen On Open (see below) - what I am
trying to do is to "hide" the records that have Closed as the Status. The
problem with my On Open procedure is it is not showing records that have no
Status. The Status field is no mandatory and sometimes there will be
something in Status and sometimes there will not. Can someone help me?

Thanks.

Me.Filter = "Status <> 'Closed'"
Me.FilterOn = True


Ty
 
Ty said:
Newbie here.

In my form, I have a field called Status. I have approximately 150
records. Some of the records have a Status like "Follow Up",
"Closed", and some have NO Status at all.

I setup a procedure for this form to happen On Open (see below) -
what I am trying to do is to "hide" the records that have Closed as
the Status. The problem with my On Open procedure is it is not
showing records that have no Status. The Status field is no
mandatory and sometimes there will be something in Status and
sometimes there will not. Can someone help me?

Thanks.

Me.Filter = "Status <> 'Closed'"
Me.FilterOn = True

Me.Filter = "Status <> 'Closed' Or Status Is Null"
Me.FilterOn = True
 
It would be much better to have an additional status "Unassigned" and
make it the default at the table level, otherwise you have to modify
the filter to include null values.

In the long run, the first way is better or you may find yourself
wasting time dealing the null values again and again..

Peter
 
Back
Top