And/Or's

K

Ken L

I have a table of email addresses and Yes/No boxes.

emailLists{emailaddress,list1,list2,list3,list4,list5,list6,list7}

each email address can belong to up to 7 different lists

I need to make a query that will ask the user which lists they want to
select, then display the email addresses. So the user can pick any
combination of the seven lists, and get the email address. Examples, List1
and List3. List2 and List3 and List4. List 7.

Does that make sense?
 
A

Allen Browne

No, that's not the best way to design this.

Client table: one record for each client. Fields:
ClientID AutoNumber primary key
Surname Text
FirstName Text
Email Text

MailList table: one record for each mailing list.
MailListId AutoNumber primary key
MailListName Text name for this list.

ClientMaillist table: one record for each client on each list:
ClientID Number relates to Client.ClientId
MailListId Number relates to MailList.MailListId

The interface consists of a main form bound to the Client table, with an
subform bound to the ClientMaillist table. The subform contains a combo box
where you can select which MailList to put the client on, one per row. So if
the client is on two lists, there are 2 entries in the subform; if the
client is on 20 different lists there are 20 rows in the subform.
 

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