• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

How to right justify a column in a multi-column text box

I need to right-justify a currency formatted column in a text box containing a number of columns.  How is this done?
0
David_W_R
Asked:
David_W_R
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
Dale FyeCommented:
I've never heard of a multi-column textbox, do you mean a list-box?

List boxes always format the data as text strings, and automatically line up to the left of each column.  When I want to display numeric values, right justified in a listbox, I use a non-proportional font, and pad the left side of the string, something like:

Right(Space(10) & [SomeField], 10)
0
 
PatHartmanCommented:
I do it this way - which probably has the same effect as what Dale suggested so no points please unless this works and his doesn't.  I chose 12 as the width of the output field.  That gives extra room for the $ and commas and decimal.
Space(12 - Len(SomeField)) & SomeField
0
 
Jeffrey CoachmanMIS LiasonCommented:
If you do not need non-contiguous selections, (or if you just need to display these values), ...You may opt to use a small datasheet view subform
You will have to set the AllowEdits, AllowDeletions, and AllowAdditions, Properties all to NO
It will look something like this:
Subform...and the the Currency values will display in their native, Right Justified position...

JeffCoachman
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
David_W_RAuthor Commented:
I really appreciate the insight from each answer.  I think I'll use the datasheet to take advantage of the Access automatic formatting of currency.
0
 
Dale FyeCommented:
Yeah, I should have mentioned that I have started using a lot more datasheets instead of listboxes because of their versatility.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Dave,
Yep, , it all depend on what you need.
If you had needed non-contiguous selects, you would not have been able to use the datasheet view.

Each approach will have advantages and disadvantages.
;-)

Jeff
0
 
Dale FyeCommented:
When I need non-contiguous selects, I simply add a Yes/No column to the mix and allow the user to "check the box".

Dale
0
 
David_W_RAuthor Commented:
I certainly appreciate the follow-up comments.  Thanks again all.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now