Thanks John,
Both your expressions worked. I will use the second one.
At 8/10/2011 06:00 PM, you wrote:
>For starters, ClubName and Formerly are in the wrong place! That information
>should be associated with the club, and not each member. If you're pulling
>member info and club info from separate tables, then that would make
>more sense.
Three tables are involved. Members data is recorded in "tMembers" and
the "MemberID" is recorded in the second table "tMembersClubHistory".
The third table is "tClubs" which includes the fields "ClubName" and
"Formerly" and "ChangeDate".
This is the complete SQL:
SELECT tMembersClubHistory.MemberID,
tMembersClubHistory.DateJoinedThisClub,
IIf([DateJoinedThisClub]<[ChangeDate],[Formerly],[ClubName]) AS Club
FROM tClubs INNER JOIN tMembersClubHistory ON tClubs.ClubID =
tMembersClubHistory.ClubID;
>And to answer your specific question, your IIf is backwards. Right
>now, if the
>date joined is before the change date, you're displaying the current ClubName.
OOOPS! I should have known that! Very careless.
Regards,
Robin
Sabtu, 08 Oktober 2011
RE: [MS_AccessPros] Mistake in expression
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar