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

Hidden Field Adds Date to Access Database(NewBie)

Status
Not open for further replies.

iteach2

Technical User
Sep 16, 2001
120
0
0
US
Hi Guru's,

I know this one's easy. I have a field called sign_up_date in DB. I want the date a record was added ex.10/25/03 7:20 p.m - to be added to the sign_up_date field. I tried:

<input type =&quot;hidden&quot; name=&quot;sign_up_date&quot; <%value=&quot;Now()&quot;%>


--but that didn't work.
 
Hi.. iteach2

You don't really hvae to use a hidden field to do this.... just assign the value to the field in your asp file that updates the record....

roughed in code example....

rs(&quot;myfield1&quot;)= request.form(&quot;whatever&quot;)
rs(&quot;myfield2&quot;) = request.form(&quot;whatever2&quot;)
blah
blah
blah
etc
etc

rs(&quot;sign_up_date&quot;) = now()

rs.update

I think that now() is going to return the date and time of the server so this may or may not be what you want depending on where your server is located.

HTH....
Tom Gahagan
tgahagan@charter.net

REST



If you get a chance to sit out or dance...

I hope you dance. L Wommack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top