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

Dates in two different fields on same tbl

Status
Not open for further replies.

JSD

Technical User
Jan 18, 2002
189
US
Hello

I've been trying to rework an old database.

One tbl has a 'DateIn' field and a 'DateOut' field. When user adds a record to this tbl (through a frm), the 'DateIn' field defaults to the date of the add.

Through a different frm I'd like to update other fields in the tbl, and have the 'DateOut' default to the date of the update. However, I can't use =Date() because it is already being used as a default value in the 'DateIn' field. I was told I could put =Date() in the BeforeUpdate property for the 'DateOut' field on the frm, but that didn't work.

Any suggestions, or do tbls just need reconstructed. Any advice would be interesting and helpful.

THanks

Jeremy
 
Hi

First I do not follow your logic of why you cannot use =Date(), just because it is already being used in another field.

=Date() returns the system date at the time the command is executed, you can use it as often as you like

But since you (presumably) only want to update the DateOut when a record is updated, I would say you need to put

DateOut = Date()

in the before update event of the FORM


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top