My guess would be that the DateMod control is formatted to show only the date
part of the value, which will, due to Access's implementation of the
date/time data type as a 64 bit number with its origin at 30 December 1899 00:
00:00, show that date. Format the 'time' control as hh:nn:ss to show the
time only.
Another possibility is that DateMod is the name of the field underlying the
DateModified control or vice versa and that you have inadvertently entered it
in the code instead of something like TimeMod in the line to assign the time
modified value. The latter would seem a more logical name in this context.
You'd then be assigning the current time on 30 December 1899 to both.
But why use two field rather than one? There is no such thing as a 'date
value' or 'time value' per se in Access, only a date/time value, so it would
be better to have a single DateTimeMod field and set its value with:
Me.DateTimeMod = Now()
You can fill this new column with all existing value simply by updating the
column to DateModified + DateMod in an update query.
Ken Sheridan
Stafford, England
Hi Keven..
i am entering data in a record in a form based on a query... i am using the
following code in the forms before Update Procedure
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err
' Set bound controls to system date and time and current user name.
Me.DateModified = Date
Me.DateMod = Time()
Me.ModifiedBy = Forms![Spider Reports Today].[Operator]
BeforeUpdate_End:
Exit Sub
BeforeUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume BeforeUpdate_End
End Sub
Thanks!
Hi all, and thanks for all input from all of you. I just modified a record
and received modified date sat 30 Decemeber 1899...how is that possible?
[quoted text clipped - 8 lines]