Access 2000 Form Date question

D

Dan Johnson

Let me begin with an apology for probably a very simple question.

I have a form with five fields of information. The first field is the Date field. I would like to have the default date as "today's" date. I tried inserting Date() into the Default Date properties slot. As the form is opened, the cursor starts in the Date box but the default date is not displayed. I tried the Now() function but that did not work either. Any help is sincerely appreciated.
 
K

Klatuu

I don't know what is going on, Dan, but I did try to duplicate the problem.
I put Date() in the default value and it work just fine.
 
D

Dan Johnson

The default date works if it is Tab'ed into. But it will not work, with a
mouse down. It is okay, if it opens with the Date() already there when the
form opens.
 
K

Ken Snell [MVP]

A default value will be assigned to that control *only when* a new record is
being created. It will not be assigned for an existing record.

--

Ken Snell
<MS ACCESS MVP>

Let me begin with an apology for probably a very simple question.

I have a form with five fields of information. The first field is the Date
field. I would like to have the default date as "today's" date. I tried
inserting Date() into the Default Date properties slot. As the form is
opened, the cursor starts in the Date box but the default date is not
displayed. I tried the Now() function but that did not work either. Any help
is sincerely appreciated.
 
D

Dan Johnson

Ok, excellent, Ken; that did work. Now how do you start the form in a new
record? Thanks for the answer!!!
 
K

Ken Snell [MVP]

As soon as you "dirty" the new record, meaning that you begin to enter data
into a control, the new record begins. Until that point, the new record is
just "ready" and waiting for data; if you "cancel" it, no record is added to
the database.

You can have a form open to a new record if you set the form's Data Entry
property to Yes (see Properties window in design view). Note that this will
prevent the form from showing already existing data records, though.

--

Ken Snell
<MS ACCESS MVP>
 
Top