Combobox Filter - All Records Option

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

Guest

I have a form(ProjectsMaint) that displays information about a project. The
source of the form is a query (qryProjectsMaint) based on the Projects table.
I've added a combobox to the form so that the User can filter the records to
only display Projects with a Status Code of Active, Completed, Not Started,
Pending or Killed. The Status Code field is a numeric value 1-5. I'd like
to add a sixth value to the combobox to display all records, but can't seem
to get it to work.
Any suggestions would be appreciated.
JR
 
jhrBanker said:
I have a form(ProjectsMaint) that displays information about a
project. The source of the form is a query (qryProjectsMaint) based
on the Projects table. I've added a combobox to the form so that the
User can filter the records to only display Projects with a Status
Code of Active, Completed, Not Started, Pending or Killed. The
Status Code field is a numeric value 1-5. I'd like to add a sixth
value to the combobox to display all records, but can't seem to get
it to work.
Any suggestions would be appreciated.
JR

Have you seen this article?

http://www.mvps.org/access/forms/frm0043.htm
Forms: Adding "All" to a listbox or combobox
 
Dirk: Unfortunately this article does not apply since the bound field is
numeric not text, and it is a Key field.
=======================================
 
What is the source of the combo box you want to use for this added
filtering.

Possible:
create a separate source for the combo that is limited to the allowed +
a value of ALL.

create second project query that does not use the combo box as a
condition.

in the on change or afterupdate event of that combobox, test what has
been selected and change to rowsource of your subform dependent on the
selected value.
 
jhrBanker said:
Dirk: Unfortunately this article does not apply since the bound
field is numeric not text, and it is a Key field.
=======================================

I don't see how those distinctions are relevant. You can certainly use
the technique described in that article for combo boxes that are bound
to numeric key fields. Maybe I'm missing some subtle issue, but I think
you should read the article again. If you can't work it out, post the
details of your form and combo box, and I'll see if I can guide you.
 
Back
Top