Selasa, 16 Juli 2013

[MS_AccessPros] General date format keeps changing

 

I have created a table that has a field called ModifiedDate defined as DateTime and format as General. However when I am trying to update it through code on a form with the following code:

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err

' Set bound controls to system date and time.
Me.ModifiedDate = Date
'TimeModified = Time()

BeforeUpdate_End:
Exit Sub

BeforeUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume BeforeUpdate_End

End Sub

But when it runs it is inserting the date as a short date on the form. I doubled checked the form field and it has a General Date format. I need to have the field display both date and time. Am I missing something?

Thanks

Art Lorenzini
Sioux Falls, SD

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar