IIF Address has Suite#

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

Guest

I am trying to pull a address off a form named "frmeverything". If there is
no "suite" I want just the address, but if there is a "Suite" I want that
to. I am using the following code that errors out, but I'm to blind to see
it. Would someone please show me the path??

Thanks

=iif(isnull([Forms]![frmeverything]![DeveloperSuite]),[developerAddress],[developerAddress]& “ Suite # “ & [developerSuite])
 
In ordinary Access queries you can make use of the behaviour of + when
used as a concatenation operator (instead of the usual &). + propagates
Nulls, so something like this

Me.DeveloperAddress.Value + " Suite # " + Me.DeveloperSuite.Value

should do what you want. If the code isn't running behind frmeverything,
use Forms.("frmEverything"). instead of Me. .

Otherwise, your IIf() expression looks OK apart from the curly quotes,
which will cause it to fail.

I am trying to pull a address off a form named "frmeverything". If there is
no "suite" I want just the address, but if there is a "Suite" I want that
to. I am using the following code that errors out, but I'm to blind to see
it. Would someone please show me the path??

Thanks

=iif(isnull([Forms]![frmeverything]![DeveloperSuite]),[developerAddress],[developerAddress]&
“ Suite # “ & [developerSuite])
 
=iif(isnull([Forms]![frmeverything]![DeveloperSuite]),[developerAddress],[developerAddress] & “ Suite # “ & [developerSuite]))

You were only missing a closing paren.
 
Klatuu, Thanks! That was it!!!

Klatuu said:
=iif(isnull([Forms]![frmeverything]![DeveloperSuite]),[developerAddress],[developerAddress] & “ Suite # “ & [developerSuite]))

You were only missing a closing paren.

open a adobe file from a command button said:
I am trying to pull a address off a form named "frmeverything". If there is
no "suite" I want just the address, but if there is a "Suite" I want that
to. I am using the following code that errors out, but I'm to blind to see
it. Would someone please show me the path??

Thanks

=iif(isnull([Forms]![frmeverything]![DeveloperSuite]),[developerAddress],[developerAddress]& “ Suite # “ & [developerSuite])
 
Back
Top