Forums
This topic is locked
Auto insert date/time when form submitted
03 Jun 2003 23:12:50 Les Smith posted:
How do you automatically insert a date and time into an access database when a dreamweaver form is submitted? I have tried setting the default value to [date()] in the date field of my database but that does not give me the most current date when a NEW record is submitted. I have also tried setting the default value to <=% Date %> in a hidden field and tried sending the value to my database and each time I get an error message.
Edited by - lawaiamwa on 04 Jun 2003 15:31:18
Replies
Replied 03 Jun 2003 23:58:48
03 Jun 2003 23:58:48 Owen Eastwick replied:
Set the default value of the field to Now() if you want the date AND time.
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Replied 13 Jun 2003 18:25:55
13 Jun 2003 18:25:55 Ken Dobson replied:
If this isn't going to change on the form, you could just do it in your Access table. On your date field in the table, set the default value to DATE() and for your time field, TIME(). You won't have to bother with the form at all and all new records will have the date/time when that record was created.
Ken
Ken