Selasa, 10 Juni 2014

RE: [MS_AccessPros] Iif problem in query

 

Robin,

 

That is a very unusual structure that forces you to do unnecessary maintenance when someone’s marital status changes (deleting the surname from one field and inserting into another.) The queries would be simpler if you had a single field for last names and additional fields for gender and marital status.

 

Glenn

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Monday, June 9, 2014 9:47 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Iif problem in query

 

 


I have a database listing residents. The fields involved are
[fLastName] and [mLastName].

I need a new field [rLastName] which is to be a list of the last
names of single persons and married couples.

This one gives me single males only:

rLastName: IIf([mLastName] Is Null,[fLastName],[mLastName])

which I understand.

This attempt misses the single males but includes married males and
single females:

rLastName: IIf([fLastName] Is Null,[mLastName],Iif([fLastName] Is Not
Null,[fLastName],""))

What have I missed?

Many thanks,

Robin Chapple

__._,_.___

Posted by: "Glenn Lloyd" <argeedblu@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar