Nested If

S

Suzanne

Hi, I'm having trouble with making a field in my select query, this is what i
have so far, you can get the gist of what i want to do from it:

Census: IIf([Census Req]<>â€â€ And [Census Rec’d]<>â€â€,â€Sent “ & [Census Req] &
“ Rec’d “ & [Census Rec’d], IIf([Census Req] <>â€â€ And [Census Rec’d]
=â€â€,â€Sent “ & [Census Req], “Rec’d “ & [Census Rec’d]))

If anyone can help i would really appreciate it.

Thanks
 
K

KenSheridan via AccessMonster.com

Might it be that the fields are Null rather than containing zero-length
strings? To cover both possibilities:

Census: IIf([Census Req] & "" <> "" And [Census Rec’d] & "" <> "","Sent " &
[Census Req] & " Rec’d " & [Census Rec’d], IIf([Census Req] & "" <> "" And
[Census Rec’d] & "" = "","Sent " & [Census Req], "Rec’d " & [Census Rec’d]))

Ken Sheridan
Stafford, England
Hi, I'm having trouble with making a field in my select query, this is what i
have so far, you can get the gist of what i want to do from it:

Census: IIf([Census Req]<>"" And [Census Rec’d]<>"","Sent " & [Census Req] &
" Rec’d " & [Census Rec’d], IIf([Census Req] <>"" And [Census Rec’d]
="","Sent " & [Census Req], "Rec’d " & [Census Rec’d]))

If anyone can help i would really appreciate it.

Thanks
 

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