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!!


.
 
Back
Top