Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Date of Input

Status
Not open for further replies.

mpsDA

IS-IT--Management
Jul 27, 2005
43
GB
Is there a way to have a Field setup to Automaticaly have the Date of Inputting appear into the field of a record.
 
Before Insert Event of the form
Me.Field = Date

Pampers [afro]
Just let it go...
 
Have a look at the DefaultValue property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV.
What would you type in the default Value?


PAMPERS.
Me.Date_of_Input = Date

Does not Work

Im and putting the code here.....

Private Sub Date_of_Input_BeforeUpdate(Cancel As Integer)
Me.Date_of_Input = Date
End Sub
 
What would you type in the default Value?
=Date()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
in the default value of the control/field you put: =Date()

for the event to occur, it has to be in the before insert event of the form, not the field.

Pampers [afro]
Just let it go...
 
OK it does bring in the current date but when goin backk to the record it changes to the current date each time its opened for axample if i was creating a record on the 1st of May...it will display the 1st of may into the field.

When i open it the following day it will replace the date with current date.

Do i need extra coding?
 
I think you have to bind it to a datasource; it looks like it is an unbound control now.

Pampers [afro]
Just let it go...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top