Yes, the data type for the field is date/time.
12/9/09 (not 12/10/09, 12/04/09, 12/09/09).
Thanks.
That's a puzzle. I am still inclined to think that Access is seeing an
alphanumeric string, and not a numeric value interpreted as a Date/Time
field.
1) Reside in a table
2) Be extracted from the table by a query (usually) acting as the Record
Source of the Report
3) Be displayed in a control (often a text box) on the report itself
You've said that the field is a Date/Time value - I presume that is the table
definition.
Could you check how the value is retrieved in the query? If someone has
used the "Format()" function (not the same as changing the format settings)
then the result of that is a string. You could view the query in SQL mode
and post that text here.
One thing worth trying is copying your query (or creating a new one) and
FieldType:VarType([MyDateField])
... replacing MyDateField with the name of your "date" field. The value
returned (see Help on VarType) will tell you what Access thinks it is looking
at. 8 means it is a string.
Failing that, have a look at the properties of the control in which the Date
value is displayed. Any "extras"?
Phil
Post by KenSheridan via AccessMonster.comWeird. The date/time data type in Access is actually implemented as a 64
floating point number, with the integer part representing each day and the
fractional part the times of day. It starts counting from 30 December 1899
00:00:00, which has an underlying value of zero. What you see is just a
formatted representation of the underlying number, and it can be formatted
however you wish, but the underlying value, which is what it is sorted by,
remains the same regardless of the format.
17/12/2009 17:39:27
12/17/2009 17:39:27
but the underlying value is the same in both cases
40164.7357291667
which can be seen with: CDec(Now()).
So what Access is sorting by when it sorts a date/time value is just a number
which increases, day by day, second by second, as time advances. So an
earlier date will always sort before a later one regardless of the format in
which its expressed. Why this appears not to be happening in your case is a
mystery.
What is the report's RecordSource property. Is it the table itself? Is it
query? If the latter, what is the SQL of the query? Whatever the case, in
the report's sorting and grouping dialogue, is it sorted on the field name
itself, or on an expression which includes it? Finally, is the date the
first group level in the sorting and grouping dialogue?
Ken Sheridan
Stafford, England
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200912/1
Submitted via EggHeadCafe
Microsoft ASP.NET For Beginners
http://www.eggheadcafe.com/training-topic-area/ASP-NET/7/ASP.aspx