How do I get Date Time Control to Auto Update when adding a new record?

C

Casey

Hello All,

I am new to Access I have created a data base, I have
input various fields in a table and then created a form
after.

Now when I go to add a new record to a form I have a Date
and Time field, I want this date and time field to
automatically input the date and time a new recorded is
created. Currently it is just a blank field that needs
to have users input the date and time.

I'm thinking this would be creating a expression but I do
not see what expression or have a list some where that
tells me what expressions do what! Or even if i'm on the
correct path to go about this.

If some one could tell me how to do this would be great! :)

Thank you in advance.

Casey,
 
C

Cheryl Fischer

In design view of your table, go to your DateTime field. Then in the
Default Value for the field, enter the following:

=Now()

hth,
 
C

Casey

That worked
Thank you!
:)
-----Original Message-----
In design view of your table, go to your DateTime field. Then in the
Default Value for the field, enter the following:

=Now()

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX




.
 
G

Guest

I have default values for my record creation date and time working fine
using =Date() and =Time().
How can I automatically update the date and time a record was changed on
a form in Access 2000?

Thanks.
T
 
J

John Vinson

How can I automatically update the date and time a record was changed on
a form in Access 2000?

You need a bit of VBA code for this. In the Form's BeforeUpdate event,
set the value of a control bound to the timestamp field (the control
can be invisible if you want) to Now().

Note that this doesn't timestamp a record if the user opens the table
directly or uses an Update query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top