Trim and Iif

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

Guest

Here's what I used:

=IIf(IsNull([customercompanyrep]),[customerlastname] & ", " &
[customerfirstname],[customercompanyrep] & "( " & [customerfirstname] & " " &
[customerlastname] & ")" )


to try and get this displayed:

Last Name, First Name
or
Company Name (First Name Last Name)

Please help me with my syntax, all I get is "#Error"

Also, will I need to (and if so can I) use Trim on this as well?
 
It's likely that the error is due to the control (I assume a textbox) having
the same name as one of the fieldnames in the expression. If that's the
case, just rename the control and all should be well.

HTH,

Rob
 
Back
Top