Sabtu, 21 Februari 2015

RE: [MS_AccessPros] #error given by my poor code.

 

Thanks Duane,

The suggestion worked but was complicated by the use of an 'Admin' status. I started again and this gives me the answer that I needed:

mName: IIf([mFirstName] Is Null,"",[mFirstName] & " " & [LastName])
fName: IIf([fFirstName] Is Null,"",[fFirstName] & " " & [LastName])

I failed when I attempted to change  Is Null to <>"" as in a previous advice. The object being to avoid dirty fields.

My continued thanks,

Regards,

Robin Chapple



At 21/02/2015 05:48 PM, you wrote:

 

Is the actual value of ResidentStatus the full string "3 or 4" or is it "3" or "4" or is it 3 or 4? If the field stores a single numeric value, try:
mName: IIf([ResidentStatus] = 3 Or [ResidentStatus] = 4,"",[mFirstName] & " " & [LastName])
 
Duane Hookom MVP
MS Access
 
> To: MS_Access_Professionals@yahoogroups.com
> From: MS_Access_Professionals@yahoogroups.com
> Date: Sat, 21 Feb 2015 16:23:12 +1100
> Subject: [MS_AccessPros] #error given by my poor code.
>
> I am attempting to make the names of male residents from a database
> where male and female first names are in separate fields. The last
> name is common to both.
>
> My failed attempt gives ne a "#error" without an indication of what I
> have missed.
>
> Status 3 and 4 are married couples and partnered couples.
>
> mName: Iif([ResidentStatus]="3 or 4","",[ mFirstName] & " " & [LastName])
>
> What have I missed?
>
> Many thanks,
>
> Robin Chapple
>
>
>
> ------------------------------------
> Posted by: Robin Chapple <robinski@westnet.com.au>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/MS_Access_Professionals/
>
> <*> Your email settings:
> Individual Email | Traditional
>
> <*> To change settings online go to:
> http://groups.yahoo.com/group/MS_Access_Professionals/join
> (Yahoo! ID required)
>
> <*> To change settings via email:
> MS_Access_Professionals-digest@yahoogroups.com
> MS_Access_Professionals-fullfeatured@yahoogroups.com< br>>
> <*> To unsubscribe from this group, send an email to:
> MS_Access_Professionals-unsubscribe@yahoogroups.com
>
> <*> Your use of Yahoo Groups is subject to:
> https://info.yahoo.com/legal/us/yahoo/utos/terms/
>

__._,_.___

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