Thank you for the response but it didn't really get me
much further.
I have a list of 1000 clients with postal codes (PC's).
There are about 200 different FSA which would apply to
these PC's but both lists will grow in the future.
What I'm trying to prevent is having to reconstruct the
query everytime I want to sort my clients by FSA.
The way I thought about doing this was to have every
possible FSA in another table (Table 2) with another
field that is a yes/no box. When I want to include a
certain FSA I turn on the yes/no box and create a select
query to show only thos FSA's
From here I wanted to take the selected FSA's and apply
them to the PC list in my client table. Kind of like
using a parameter query where the parameter is specified
by the list of FSA's in another query.
Here's what I tried - but it didn't work.
Table 1 has Client ID & Postal Code (format N2T 2R8)
Table 2 has FSA's (format N2T, etc...) and a yes no box
Query 1 has only the FSA's from Table 2 with the box on
Query 2 has the client ID (and address info) where the
postal code criteria is [[Query 2]![FSA]*] but it really
didn't like that expression. Is there another way to do
it that will work?
-----Original Message-----
Ian, I'm not quite sure I understand what you're trying
to accomplish. Are
you:
1-trying to retrieve the FSA for the PCs that you
include in your criteria;
or
2-trying to retrieve a list of PCs by FSA?
It it's (1), there's no getting around creating long
select criteria. At
least the wildcards will ease the burden somewhat. If
it's (2), it should be
easier.
Assuming (2), you need a table that lists, as unique
values, the postal
codes (in one field) with the forward sortation areas
(in another field)
they fall into. Your table2 sounds like it fits this
description. If this is
so, you can set up a 1-to-many relationship between
tables 1 and 2 with
table2 on the "1" side. Then you can create a query that
includes both
tables, with the PC field from table1 and the FSA field
from table2. Enter a
FSA as criteria and you will get a list of PCs that fall
into it, together
with whatever other fields you include in your query.
Hope this helps.
DDM
"DDM's Microsoft Office Tips and Tricks"
www.ddmcomputing.com
message
I posted this in query's but noone seemed able to help.
I'd like to make a select query for one table based on
the values in another.
Specifically Table 1 contains the contact information
for
people with postal codes (N2T 2R8, M2J 2X9, etc..).
Table 2 contains the forward sortation area (field:
FSA)
of postal codes that I'd like to select out (N2T, N1R,
etc...)
Previously I'd create a select query for table one with
criteria for postal codes Like "N2T*" OR "N1R*" OR
etc...
but I don't want to have to keep creating these long
select criteria.
I tried creating the a table 1 query with the criteria
Like [table2]![FSA]* but I got an error. When I took
out
the * I got nothing.
Any ideas?
.