Eliminating spaces between text boxes in a report

E

Emile

I have 3 text boxes on one line in my report. I would like to eliminate any
spaces between the boxes due to variable length text

The first box is a product name: sPCN_nam
The second box is text based on an IIf statement:
IIf([sSAT_cde]=12,"Before","")
The third box is a number
The result I get now follows:
1 2 3
Product Name Before 12568

Because box 1 can vary in length, I spaced box 2 far enough away from 1 so
as 1 would never run into 2 and then box 3 is far enough away from 1 & 2

I wrote the following line in box 1 to combine them together with a space
between each no matter what the length of 1 or 2

sPCN_nam&""&=IIf([sSAT_cde]=12,"Before","")&""&=[qryRPTConsolidatedStatement!plan_sys_plan_num]

This did not work. Also you should note that for box 2 if sSat_cde does not
= 12, then a print a space

Any help with this simple problem would be greatly appreciated. Thanks in
advance
 
T

tina

if the expression you posted is *exactly* the way you wrote it in the report
control, then try this variation, as

=[sPCN_nam] & "" & IIf([sSAT_cde]=12,"Before","") & "" &
[qryRPTConsolidatedStatement!plan_sys_plan_num]

the above goes all on one line in the control's ControlSource property -
make sure you have a space between the last ampersand (&) and the bracket
([) that follows it. also, make sure that the control does not have the same
name as any of the fields that are referred to in the expression.

hth
 

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