Displaying too many records

F

FirstVette52

How can I create a query that prompts users for up to (5) 4-digit Years (text
field calld 'ClubID') and screens out records when they have a 'StopMail'
code that's not empty or is not 'None'.

The problem is that any given Donor may have given in multiple years, and I
need to display the Donor only once, no matter how many years he's in (for
mailing labels).

Thanks for your time
 
J

J_Goddard via AccessMonster.com

Hi -

You didn't give us much to work with. Do you want the query itself to prompt
for the required year(s), or are you using a form? In this case, the latter -
a form - is probably easier.

What you want your SQL to look like is something like this:

Select fieldlist from yourTables where
ClubID in ('2001' , '2003', '2004') AND
(Stopmail is Null OR Stopmail = 'None')

This shows three years in the selection; but it could be one or more.

I think it will be a lot easier to use a form and VBA to generate the
required SQL.

HTH

John
 

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