Reports Advice

C

Craig Armitage

Hi,

Im trying to build a report that lists customers correctly... You guys might
remember me asking about this inside a combo box the other day...

im trying to do the same thing in a report textbox... in the control
source property, i have the following... (its a small part of building the
whole customers name) but it keeps returning an error...

I know the error is because of the "&" onwards portion but i dont know the
correct way to format this...

help!

=IIf([Customer_Prefix] Is Null,"",[Customer_Prefix] & " ") &
(IIf([Customer_Forenames] Is Null,"",[Customer_Forenames] & " "))
 
A

Al Campagna

Craig,
Whenever you get an error, please indicate what that error is in your post.
Try...
= IIf(IsNull([Customer_Prefix]),"",[Customer_Prefix] & " ") &
IIf(IsNull([Customer_Forenames]),"",[Customer_Forenames] & " ")

Didn't test, but that should do it.
 
C

Craig Armitage

Ok, well im getting a bit further got the name to display correctly, but now
i have a section called "Area" and im using the following string in the
control source....

=IIf(IsNull([Customer_BusinessTown]),[Customer_HomeTown] &
"(Home)",[Customer_BusinessTown] & " (Business)")

The idea being that if there is a Business Area specified, then it uses
that, if not, it uses the home area.

The problem is that its returning #error whenever its a home town and i cant
understand why?

in fact, after checking, it even returns #error when i just put
=[Customer_HomeTown]

Is there any way to find out what the actual error is... as far as i can
see, the Customer_HomeTown field has the same basic properties as
Customer_BusinessTown and yet that works fine!

Help!!
 
A

Al Campagna

Craig,
Your
=[Customer_HomeTown]
field should not be named Customer_HomeTown. Since it is a calculated field, it can
not be named the same as any field contained in the calculation.
Try a name like CustHomeTown or txtCustomer_HomeTown.

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Craig Armitage said:
Ok, well im getting a bit further got the name to display correctly, but now i have a
section called "Area" and im using the following string in the control source....

=IIf(IsNull([Customer_BusinessTown]),[Customer_HomeTown] &
"(Home)",[Customer_BusinessTown] & " (Business)")

The idea being that if there is a Business Area specified, then it uses that, if not, it
uses the home area.

The problem is that its returning #error whenever its a home town and i cant understand
why?

in fact, after checking, it even returns #error when i just put =[Customer_HomeTown]

Is there any way to find out what the actual error is... as far as i can see, the
Customer_HomeTown field has the same basic properties as Customer_BusinessTown and yet
that works fine!

Help!!



Craig Armitage said:
Hi,

Im trying to build a report that lists customers correctly... You guys might remember
me asking about this inside a combo box the other day...

im trying to do the same thing in a report textbox... in the control source property,
i have the following... (its a small part of building the whole customers name) but it
keeps returning an error...

I know the error is because of the "&" onwards portion but i dont know the correct way
to format this...

help!

=IIf([Customer_Prefix] Is Null,"",[Customer_Prefix] & " ") & (IIf([Customer_Forenames]
Is Null,"",[Customer_Forenames] & " "))
 

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