one table, 2 fields sort, for label list

G

Guest

I have a table of names and addresses and other info. One filed to designate how they receive the News Letter, is "Type" as in 'S' for single, 'M' for Married, 'MH" married head of household, "E' electronic (E-mail) and another field "STATUS" for "Active", "Deceased", Inquire', "Unknown". I have been using a queri for mail labels, I want all the "S" and "MH" from 'Type" and all the 'Active' and "Inquire" from status. I had used the GUI and criteria set "S" or (next line) "MH" and "Status" set "Active" or (next line) "Inquire". For 2 years this worked, 2 months age it stopped working. I get only the "S" and "Active".
Below is the code, as I said it has worked for the last 2 years. I have no idea why this shouldn't work, it seems simple enough. Thanks for any help you can give.
Br. Dismas.

SELECT [Membership List].Title, [Membership List].Type, [Membership List].[First Name], [Membership List].[Last Name], [Membership List].Address, [Membership List].[Second Address], [Membership List].City, [Membership List].State, [Membership List].[Postal Code], [Membership List].Status
FROM [Membership List]
WHERE ((([Membership List].Type)="S") AND (([Membership List].Status)="Active")) OR ((([Membership List].Type)="MH") AND (([Membership List].Status)="Inquire"));
 
K

Ken Snell

You want all records that have Type = "S" or "MH" and that have a Status =
"Active" or Status = "Inquire"? If yes,

SELECT [Membership List].Title, [Membership List].Type, [Membership
List].[First Name], [Membership List].[Last Name], [Membership
List].Address, [Membership List].[Second Address], [Membership List].City,
[Membership List].State, [Membership List].[Postal Code], [Membership
List].Status
FROM [Membership List]
WHERE ([Membership List].Type)="S" OR [Membership List].Type)="MH") AND
([Membership List].Status)="Active" OR [Membership List].Status)="Inquire");


--

Ken Snell
<MS ACCESS MVP>

Br. Dismas SFO said:
I have a table of names and addresses and other info. One filed to
designate how they receive the News Letter, is "Type" as in 'S' for single,
'M' for Married, 'MH" married head of household, "E' electronic (E-mail) and
another field "STATUS" for "Active", "Deceased", Inquire', "Unknown". I
have been using a queri for mail labels, I want all the "S" and "MH" from
'Type" and all the 'Active' and "Inquire" from status. I had used the GUI
and criteria set "S" or (next line) "MH" and "Status" set "Active" or (next
line) "Inquire". For 2 years this worked, 2 months age it stopped working.
I get only the "S" and "Active".
Below is the code, as I said it has worked for the last 2 years. I have
no idea why this shouldn't work, it seems simple enough. Thanks for any
help you can give.
Br. Dismas.

SELECT [Membership List].Title, [Membership List].Type, [Membership
List].[First Name], [Membership List].[Last Name], [Membership
List].Address, [Membership List].[Second Address], [Membership List].City,
[Membership List].State, [Membership List].[Postal Code], [Membership
List].Status
FROM [Membership List]
WHERE ((([Membership List].Type)="S") AND (([Membership
List].Status)="Active")) OR ((([Membership List].Type)="MH") AND
(([Membership List].Status)="Inquire"));
 
K

Ken Snell

Just to be sure I'm understanding, did the suggested query SQL statement
that I posted give you the desired results?
--

Ken Snell
<MS ACCESS MVP>


Br. Dismas SFO said:
Thanks Ken, I tried a cut/paste and I still got all 213 records,
"S","M","MH","E". After giving all the 'TYPE' , the 'StATUS' never had a
chance to select "Active' or Inqueri"
Thanks again, Br. Dismas
--
Thanks for your Help, Br. Dismas SFO


Ken Snell said:
You want all records that have Type = "S" or "MH" and that have a Status =
"Active" or Status = "Inquire"? If yes,

SELECT [Membership List].Title, [Membership List].Type, [Membership
List].[First Name], [Membership List].[Last Name], [Membership
List].Address, [Membership List].[Second Address], [Membership List].City,
[Membership List].State, [Membership List].[Postal Code], [Membership
List].Status
FROM [Membership List]
WHERE ([Membership List].Type)="S" OR [Membership List].Type)="MH") AND
([Membership List].Status)="Active" OR [Membership List].Status)="Inquire");


--

Ken Snell
<MS ACCESS MVP>

I have a table of names and addresses and other info. One filed to
designate how they receive the News Letter, is "Type" as in 'S' for single,
'M' for Married, 'MH" married head of household, "E' electronic (E-mail) and
another field "STATUS" for "Active", "Deceased", Inquire', "Unknown". I
have been using a queri for mail labels, I want all the "S" and "MH" from
'Type" and all the 'Active' and "Inquire" from status. I had used the GUI
and criteria set "S" or (next line) "MH" and "Status" set "Active" or (next
line) "Inquire". For 2 years this worked, 2 months age it stopped working.
I get only the "S" and "Active".
Below is the code, as I said it has worked for the last 2 years. I
have
no idea why this shouldn't work, it seems simple enough. Thanks for any
help you can give.
Br. Dismas.

SELECT [Membership List].Title, [Membership List].Type, [Membership
List].[First Name], [Membership List].[Last Name], [Membership
List].Address, [Membership List].[Second Address], [Membership List].City,
[Membership List].State, [Membership List].[Postal Code], [Membership
List].Status
FROM [Membership List]
WHERE ((([Membership List].Type)="S") AND (([Membership
List].Status)="Active")) OR ((([Membership List].Type)="MH") AND
(([Membership List].Status)="Inquire"));
 

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