Selasa, 10 Juni 2014

RE: [MS_AccessPros] Iif problem in query

 

Thanks Glen,

That has sorted the problem! I already have a 'Status' field and it will be straightforward  to combine the separate 'Last Names' into one field 'lastname' and use the status for the report!!

Magic.

Much appreciated.

Robin Chapple


At 10/06/2014 08:06 PM, you wrote:

 

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,[mLas tName],Iif([fLastName] Is Not
Null,[fLastName],""))

What have I missed?

Many thanks,

Robin Chapple

__._,_.___

Posted by: Robin Chapple <robinski@westnet.com.au>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar