Trim and Iif

M

miss031

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?
 
R

Rob Parker

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
 

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

Top