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?
Try this:
iif(len(trim(x)) < 22, trim(x) & text(22 - len(trim(x)), " "), x)
where x is your merged name.
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?
I think you mentioned that you are generating this report from a query.
Why not do it in the query?
Okay I placed the function in the query - but what do I use in place of TEXT?
Thanks
JONP
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.
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
Oops, my bad.
Replace TEXT with STRING and try that.
Thanks fmm! It worked brilliantly!!
Have a good one,
JONP