Ok - I like the idea of a combo box, but I can't get the
filter to run. I'm going to forget the null values for
now.
Name of table containing status list is "PoStatus" (It
has one field called status which contains the values
complete, partial, incomplete) ?Would a value list as a
row source in the combo box do the same thing? I tried
this first but when it didn't work, I tried the table
like you suggested. Still no joy.
Combo box name: combo196
Row source: SELECT DISTINCT [postatus].[Status] FROM
postatus;
AfterUpdate event:
Me.Filter = "POstat ='" & Me.Combo196 & "'"
The code picks up the value of the combo box, but doesn't
apply the filter.
I hope you can help. Thanks.
-----Original Message-----
If you follow the logic in my code suggestions, you will be able to
easily build your own, but I would recommend using another way of
choosing the option than a command button. I think it would be best to
use a combo box that would list the available choices, in this case
Complete, Incomplete, Partial. You can do that by setting the combo box
row source to a statement like
SELECT DISTINCT status FROM MyTable
Then, you can create the filter in one step by putting the following in
that combo box AfterUpdate event:
Me.Filter = "status = '" & Me.MyComboBox & "'"
To get rid of Null values, try:
Me.Filter = "IsNull(status) = False" or
Me.Filter = "Not Is Null status"
although I would prefer to filter the null values in the form's record
source beforehand.
Good luck,
Pavel
.