How do I left justify a date

  • Thread starter Thread starter DavidSherwood
  • Start date Start date
D

DavidSherwood

I have a date with format 'yyyy mmmm'. I would like it left justified. The
help says I can use ! but when I type '!yyyy mmmm', Access changes it to
'!"yyyy mmmm"'. When I type 'yyyy mmmm!', the "!" is displayed with the date.
 
Where are you viewing the date? Have you tried to set the Text Align
property to Left?
 
DavidSherwood said:
I have a date with format 'yyyy mmmm'. I would like it left justified. The
help says I can use ! but when I type '!yyyy mmmm', Access changes it to
'!"yyyy mmmm"'. When I type 'yyyy mmmm!', the "!" is displayed with the date.


I think that's a bug in how Access "optimizes" the format
codes. Use the Text Align property instead.
 
Ok, I see Text Align property in table definition. I changed it there and
when I just display the table, it works. But I have Queries over this table
that still right justify and there is no text align property at the query
level.
 
Text Align in the table does no good, you have to align where you are
displaying the data.If you will be viewing the query results it means that you would not be
using the data for further processing so if you format it the results is a
string (text) and will be left aligned.
 
DavidSherwood said:
If I convert the date to string in a query, it won't sort properly
Your problem stems from using the Query Builder to display results to users.
That is not what the tool was designed for. You should be displaying query
results to the user in a report or form where you have complete control over
how the data is formatted for display. The Query B uilder is for designing
and testing queries - it is n ot intended to be an enduser interface.
 
Reports are static paper like results. Queries let the user inter-react:
filter, sort re-arrange columns. Of course queries are for end users.
 
DavidSherwood said:
Reports are static paper like results. Queries let the user
inter-react: filter, sort re-arrange columns. Of course queries are
for end users.

You definitely have the wrong idea about reports. But carry on.
 
Back
Top