Forums

This topic is locked

Add Current Date To An Insert Form??

Posted 11 Jun 2002 09:22:14
1
has voted
11 Jun 2002 09:22:14 Russell Marshall posted:
I am currently designing a site to track support queries and would like to include the current data and maybe time also against all support queries.
I suspect the best way to acheive this is to include a hidden field in the insert record and update record forms.

How do I get the current date and time from the server and place it into the hidden field so that it is submitted to the db?

I am using Access/ASP/VBscript.

Thanks in anticipation.

Russell

Replies

Replied 11 Jun 2002 10:39:43
11 Jun 2002 10:39:43 Matthijs Horsman replied:
Hi Daverus,

There's even an easier way!

If i understand wjat you mean. If i want to know when some recod is inserted, i just make an extra field in the database, set the properies to date and time, and give the standard value of the field the line "now()" (without qoutes) This way, everytime you insert a record it add the time and date to that record...

Hope it's clear enough, here's a screen shot

www.chaps.nl/udzone/example1.jpg



Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl
Replied 11 Jun 2002 11:07:02
11 Jun 2002 11:07:02 Marcellino Bommezijn replied:
Daverus,

You want to create the date at creation of the record, but also with an update using a form.

Use a hiddenfield with the value:

<% = Now %>

And select in the update behavior where it says 'Submit as:' Date or Date MS Access

Hopes this helps

Marcellino
Replied 11 Jun 2002 11:21:49
11 Jun 2002 11:21:49 Russell Marshall replied:
Many thanks to you both.

I can use both of these methods.

Thanks Again

Davrus

Replied 09 Jul 2002 20:43:06
09 Jul 2002 20:43:06 Ken Dobson replied:
Is there a similar way to record the IP address of the person that inputted a record and save it to an Access database?

Thanks,

Ken
Replied 09 Jul 2002 22:27:42
09 Jul 2002 22:27:42 aegis kleais replied:
Sure, use <%= Request.ServerVariables("REMOTE_ADDR" %>

To display the user's IP addy.

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Reply to this topic