A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I left justify a date



 
 
Thread Tools Display Modes
  #1  
Old January 15th, 2010, 08:13 PM posted to microsoft.public.access.queries
DavidSherwood
external usenet poster
 
Posts: 11
Default How do I left justify a date

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.
  #2  
Old January 15th, 2010, 09:08 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default How do I left justify a date

Where are you viewing the date? Have you tried to set the Text Align
property to Left?

--
Build a little, test a little.


"DavidSherwood" wrote:

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.

  #3  
Old January 15th, 2010, 09:27 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How do I left justify a date

DavidSherwood wrote:

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.

--
Marsh
MVP [MS Access]
  #4  
Old January 15th, 2010, 10:27 PM posted to microsoft.public.access.queries
DavidSherwood
external usenet poster
 
Posts: 11
Default How do I left justify a date

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.
  #5  
Old January 15th, 2010, 10:43 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default How do I left justify a date

Text Align in the table does no good, you have to align where you are
displaying the data.
there is no text align property at the query level.

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.

--
Build a little, test a little.


"DavidSherwood" wrote:

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.

  #6  
Old January 15th, 2010, 11:21 PM posted to microsoft.public.access.queries
DavidSherwood
external usenet poster
 
Posts: 11
Default How do I left justify a date

If I convert the date to string in a query, it won't sort properly
  #7  
Old January 15th, 2010, 11:26 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default How do I left justify a date

DavidSherwood wrote:
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.
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #8  
Old January 16th, 2010, 02:29 AM posted to microsoft.public.access.queries
DavidSherwood
external usenet poster
 
Posts: 11
Default How do I left justify a date


Reports are static paper like results. Queries let the user inter-react:
filter, sort re-arrange columns. Of course queries are for end users.
  #9  
Old January 16th, 2010, 04:23 AM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default How do I left justify a date

DavidSherwood wrote:
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.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #10  
Old January 17th, 2010, 04:24 AM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default How do I left justify a date

Use the string for viewing and the actual date for sorting but uncheck the
'Show' box.
--
Build a little, test a little.


"DavidSherwood" wrote:

If I convert the date to string in a query, it won't sort properly

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.