View Full Version : date/time field


jarheadjim
04-10-2002, 09:39 AM
is there a way to have a date/time field fill on "click" or "enter" and then remain static? I need to view the form many times, and can't have it change constantly

David R
04-10-2002, 09:43 AM
If IsNull(Me.DateTimeField) Then Me.DateTimeField = Now() 'or Date()

Put this in whatever event you want.

Are you going to require your user to be smart enough to click in the field every time though? If this is a date/time stamp for a new record just put =Date() (or Now()) in the Default Value of the Form field. If it needs to be time-stamped when the form is completed, consider the BeforeUpdate event for the Form itself.

HTH,
David R