Nested If help

  • Thread starter Thread starter Suzanne
  • Start date Start date
S

Suzanne

Hi, I'm having trouble with my If statement, not sure what i'm doing wrong,
can anyone help? This is what i have, you can get the gist of what i want my
field 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]))

Any help would be greatly appreciated!!
 
Do yourself a favor and get rid of the apostrophy in the table field name
"Census Rec'd".

Change your expression to also eliminate the apostrophies.

Regards

Kevin
 
Without paying any attention to your logic, I would assume you are trying to
compare a Null with a zero-length-string which generally fails. You can
convert a null using syntax like:

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]))


--
Duane Hookom
Microsoft Access MVP


kc-mass said:
Do yourself a favor and get rid of the apostrophy in the table field name
"Census Rec'd".

Change your expression to also eliminate the apostrophies.

Regards

Kevin



Suzanne said:
Hi, I'm having trouble with my If statement, not sure what i'm doing
wrong,
can anyone help? This is what i have, you can get the gist of what i want
my
field 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]))

Any help would be greatly appreciated!!


.
 

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

Similar Threads


Back
Top