Re: Automatically Input Date
- From: "Fred Boer" <fredboer1@xxxxxxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 11:02:48 -0400
Hi Linda:
"Me." is a shorthand way to refer to the current active object, in this case
presumably the form. So "me" = "the form", and "DateField" = "the name of
the control that holds the value for the date".
But, really, Jeff's answer is better - is it showing up in your newsreader?
In case it isn't I repeat it here for you:
/Quoting a smarter man than me.. ;)
Add a Default property of "Date()" (to get today's date) or "Now()" (to get
the current date/time) to the control that binds to the field in your table
that records the date of the new record.
Note: "Date" is a reserved word in Access -- use a different name for the
field.
/End Quote
Cheers!
Fred
"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C1054508-DDC8-40DD-80F7-365ED516AC12@xxxxxxxxxxxxxxxx
Hi Fred,
Waht do I replace the Me. with?
Thanks
Linda
"Fred Boer" wrote:
Hi Linda:
Assuming you are using a form, in the On Current event for the form, put
code like this:
If Me.NewRecord Then
Me.DateField = Date
End If
HTH
Fred
"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1258625B-B823-4F6B-813A-B508646F57F7@xxxxxxxxxxxxxxxx
Hi,
I need to be able to have Access 2000 automatically input Date only
when
it
is a new record. How would I do this?
If the user is editing an old record and saving it, I do not want the
date
to change to the current date.
Thanks
Linda
.
- Follow-Ups:
- Re: Automatically Input Date
- From: Linda
- Re: Automatically Input Date
- References:
- Re: Automatically Input Date
- From: Fred Boer
- Re: Automatically Input Date
- Prev by Date: Re: Passing a value from one form to another
- Next by Date: Return of Yes/No Checkboxes
- Previous by thread: Re: Automatically Input Date
- Next by thread: Re: Automatically Input Date
- Index(es):
Relevant Pages
|