Show to show both results from Union Query?

G

Guest

Ihave a union query which in datashseet view shows correctly. The scneario is
Member has person1 and Person2. The union first sorts by person1 and the
second by person2, but I don't know how to get the person2 on the list? I
would have thought what appeared in datasheet view would have matched the
report but it's not. Why is this? for what it's worth...here is the query...

SELECT MEMBER.MemberNumber, [LastName1] & " " & [FirstName1] &
IIf([isSenior1]," *S") & " " & [LastName2] & " " & [FirstName2] &
IIf([isSenior2]," *S") AS Name, MEMBER.EquityStatus, MEMBER.CardExpireDate,
IIf([EquityStatus]="FULL","*F","") AS Expr1


tia.

HB
FROM MEMBER
WHERE (((MEMBER.EquityStatus)="Full" Or (MEMBER.EquityStatus)="Current" Or
(MEMBER.EquityStatus)="NonCurrent"))
ORDER BY MEMBER.LastName1;
UNION SELECT MEMBER.MemberNumber, [LastName2] & " " & [FirstName2] &
IIf([isSenior2]," *S") & " " & [LastName1] & " " & [FirstName1] &
IIf([isSenior2]," *S") AS Name, MEMBER.EquityStatus, MEMBER.CardExpireDate,
IIf([EquityStatus]="FULL","*F","") AS Expr1
FROM MEMBER
WHERE (((MEMBER.EquityStatus)="Full" Or (MEMBER.EquityStatus)="Current" Or
(MEMBER.EquityStatus)="NonCurrent") AND ((MEMBER.FirstName2) Is Not Null))
ORDER BY [Name];
 

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