Contenate & Right Justify

  • Thread starter idmnstr via AccessMonster.com
  • Start date
I

idmnstr via AccessMonster.com

Hi,

I started this code from a previous post. I want to concatenate these three
columns but the last column needs to be right justified in the space that
remains in the overall lengh of 26 positions.

LName & ", " & FName & SPACE(26-(LEN([LName] & ", " & [FName] & "") + LEN(
[CIS_Id] & ""))) & CIS_Id AS [NAME FIELD]

The result does not right justify.
 
F

fredg

Hi,

I started this code from a previous post. I want to concatenate these three
columns but the last column needs to be right justified in the space that
remains in the overall lengh of 26 positions.

LName & ", " & FName & SPACE(26-(LEN([LName] & ", " & [FName] & "") + LEN(
[CIS_Id] & ""))) & CIS_Id AS [NAME FIELD]

The result does not right justify.

Are you displaying the result using a non-proportional spacing font?
Try using Courier.

By the way, what's the purpose of the & "" in this
....... [CIS_Id] & "")
 
I

idmnstr via AccessMonster.com

fredg,

Yes, You are correct. The code did work afterall. The display was scewed
because some characters were wider than others in the font I was using to
display the results..

No, I do not know what & "" does for me in the code. It was in the example I
used from this forum. I don't believe it was explained there either.

Thank You
 

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