date (1 Viewer)

$lim

Registered User.
Local time
Today, 01:14
Joined
Dec 14, 2004
Messages
21
i have a form and i am trying to have the date field retain the value that the user last put in. So when they go to the next record the previus date that they entered will be in there, so they don't have to keep re-entering it. As of right now i have it set that it puts in today's date automatically.
 

scouser

Registered User.
Local time
Today, 06:14
Joined
Nov 25, 2003
Messages
767
Date

If you want to set the fileds value to the current date make the default value of the field:
Code:
=Date()

Not sure if that is what you meant?
Phil.
 

BLeslie88

B Leslie
Local time
Today, 06:14
Joined
May 9, 2002
Messages
228
this?

Option Compare Database
Dim vUserDate as Date

sub txtDate_lostfocus()
vUserDate = txtDate.text
end sub

sub txtDate_gotfocus()
if isnull(txtDate) then ' incase they are moving around in form to not change dates
txtDate.text = vUserDate
end if
end sub

something like this would work.
 

$lim

Registered User.
Local time
Today, 01:14
Joined
Dec 14, 2004
Messages
21
I tried that and it still did not retain the last date entered for the new record.
 

BLeslie88

B Leslie
Local time
Today, 06:14
Joined
May 9, 2002
Messages
228
well.

Well only way this would not work, would be if application was closed or form closes and re-opens....?

If that is the case, we need to do something diferent.
 

Users who are viewing this thread

Top Bottom