Text Limit (1 Viewer)

jonp

Registered User.
Local time
Today, 17:57
Joined
Sep 27, 2000
Messages
42
Hi there!

I have a query based report that merges LAST NAME & FIRST NAME. The field on my report MUST contain 22 spaces which includes all characters and spaces. If the name only has 10 characters then I need 12 spaces at the end of the name.

Is there a way to accomplish this?
 

fmm

Registered User.
Local time
Today, 11:57
Joined
Mar 15, 2001
Messages
76
Try this:

iif(len(trim(x)) < 22, trim(x) & text(22 - len(trim(x)), " "), x)

where x is your merged name.
 

jonp

Registered User.
Local time
Today, 17:57
Joined
Sep 27, 2000
Messages
42
Thanks FMM for your reply - I appreciate that. However, I can't seem to get it to work. I am inserting this function into an unbound text box and I keep getting an error message dealing with the operator.

Any suggestions?
 

fmm

Registered User.
Local time
Today, 11:57
Joined
Mar 15, 2001
Messages
76
I think you mentioned that you are generating this report from a query.

Why not do it in the query?
 

jonp

Registered User.
Local time
Today, 17:57
Joined
Sep 27, 2000
Messages
42
Okay I placed the function in the query - but what do I use in place of TEXT?

Thanks
JONP
 

fmm

Registered User.
Local time
Today, 11:57
Joined
Mar 15, 2001
Messages
76
I'm not sure I understand the question.

On your report, replace the control that formerly help the name with the new field from the query.
 

jonp

Registered User.
Local time
Today, 17:57
Joined
Sep 27, 2000
Messages
42
Hello fmm!

I wasn't sure what the TEXT reference is for in the formula you provided yesterday. I could not figure out what to use in place of this.

JON
 

fmm

Registered User.
Local time
Today, 11:57
Joined
Mar 15, 2001
Messages
76
Oops, my bad.

Replace TEXT with STRING and try that.
 

jonp

Registered User.
Local time
Today, 17:57
Joined
Sep 27, 2000
Messages
42
Thanks fmm! It worked brilliantly!!

Have a good one,
JONP
 

Users who are viewing this thread

Top Bottom