Combobox Filter - All Records Option

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
 
D

Dirk Goldgar

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
 
G

Guest

Dirk: Unfortunately this article does not apply since the bound field is
numeric not text, and it is a Key field.
=======================================
 
R

Ron2005

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.
 
D

Dirk Goldgar

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.
 

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