Align Text in Query

  • Thread starter Thread starter Ted
  • Start date Start date
T

Ted

I have a query that is right-aligning a text field. How
can I adjust this to left-align?

It's always the easiest things that seem to cause me
trouble ;)

Thanks in advance!
 
You cannot "right align" in a query, although you could pad the
beginning of that field with spaces to get the same effect. However,
this generally only works well if you are using a non-proportional
font (like Courier). If that is the case, you could do something like
the following if you really must have it right justified as a result
of the query. Personnally, I prefer to set the align property of the
control that will display the text on my forms or reports.

SELECT Right(Space(40) & [FieldName], 40)
FROM yourTable



--
HTH

Dale Fye


I have a query that is right-aligning a text field. How
can I adjust this to left-align?

It's always the easiest things that seem to cause me
trouble ;)

Thanks in advance!
 
I see the problem now...all of the fields where this
occurs have one thing in common, I am using update queries
to populate the data which is coming through ODBC as
Binary rather than Text.

Can this be avoided, or is there a way for me to change
the data type using VBA (I'm a novice at best, especially
when it comes to VBA)?

Thanks again-
 
Back
Top