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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hold latest date for new record 1

Status
Not open for further replies.

fmientjes

Programmer
Mar 27, 2002
55
NL
what is the best way to hold the last inputted date in a field, so it will be the default value for the next record?
For instance: in a record one fills in 5-11-02. Then an new record is filled in. The date of 5-11-02 should be suggested (in the same field).

Thanks,
Frans
 
You can try the changing the default value of the field.

In the after update event.
Me.thefield.DefaultValue = Me.thefield
 
I didn't get this working.
How do you put the date into a global variable, so the next record can read it?
Something like:
Record 1: afterupdate: set variable = date
Record 2: defaultvalue=variable

 
Use
Me.thefield.DefaultValue = """" & Me.thefield & """"
in the after update event

 
Thanks Mingis,:-D
Exactly what I wanted.

I must say that those """ are driving me crazy (when to use and when not).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top