Access - Field

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Gemuine

Thread Starter
Joined
Aug 16, 2007
Messages
89
Hello:

I have a database with a field called "Date". But on that field, I just want an automatic date of 10/31/05 meaning when the user goes that field it will be automatically populated with that date. How do I do that?:confused:
 
Joined
Jun 3, 2004
Messages
237
Will the user be filling in this field using a form?
Do you want to allow the user to be able to enter a date besides the current date?

The function Now() can be used to enter the current date into fields or VBA variables.

You can have the current date populated using the current day by opening the table containing the field in design view, clicking on the date field and entering Now() into the "Default Value" field in the field properties below.

This method does have its drawbacks however because it enters the current date and time when the new record is opened for input and not when the record is actually committed to the database.

If you are using a form, then you can enter use VBA code in the field's click event to set the value of the field to Now()
 

Gemuine

Thread Starter
Joined
Aug 16, 2007
Messages
89
The user will not be filling in this field. I want it to be automatically populated with a set date "10-31/05". The user will how ever fill in another field which is calle date received. And yes, the user wull be using this i a form.
 
Joined
Oct 20, 2004
Messages
7,837
Hi Gemmie
The date is based on a table, isn't it? For that table go to design view, then go to that Date field. Enter the date you want in the property field "default value"
It will enter that in all new entries automatically (but you will have to fill in the date for any older data that exists already) - you could even make it not visible or not changeable on your form.
 
Joined
Jun 3, 2004
Messages
237
Oops! I though you wanted today's date. Slurpee55's right.. Just put the set date into the field's Dafault Value property in the table design.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top