Question Regarding If Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following query built. I had to add the , between the " " so that
the city and state get properly displayed. Is there a way to use an IF query
to say that if there is not data then just to leave it blank??


HAd3: [HCity] & ", " & [HState] & " " & [HZip]


Thanks in advance for your comments :~)
 
Had3: [HCity] & IIF(HState is not null,", " & [HState],Null) & " " & [HZip]


Or using the difference between the concatenation operators

Had3: [HCity] & (", " + [HState]) & (" " + [HZip])

"Some" + Null returns Null
"Some" & Null returns "Some"

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Back
Top