query not populating

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

Guest

I have a fairly data intense Contact database. I am trying to run a simple
query that will filter contacts based upon a certain category. This category
column is set up as a combo box on the main date table. When I try to search
by a single criteria, the list will not populate. It only pulls up the first
record in the table if it meets that criteria. If not it doesn't pull up
anything.

Also, I need to setup multiple columns in the main table to show the
multiple categories of each contact. Having said this I will want to search
all category columns by this single criteria in order to obtain a complete
list. Please help.
 
How do you have these tables set up?

If one contact can belong to multiple categories, you will need at least
these 3 tables:
1. Category table (one record for each possible category), with CategoryID
primary key;

2.Contact table (one record for each person), with fields:
ContactID primary key
ContactName ...

3. ContactCategory table, with fields:
ContactID relates to Contact.ContactID
CategoryID relates to Category.CategoryID
So, if contact 23 has 4 categories, they appear 4 times in this table.

You will then have a main form for the Contact, with a subform in continuous
view for the categories of that contact (one per row.)

Now you want to be able to filter this form so that the main form shows only
those contacts who fit a particular category. For details on how to do that,
see:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html
 
Back
Top