From: Frank Martin on
I have a small database and I want to record, in a table
field, the date at which a record is added (but not edited).

I want this to be permanent.

Should I make the "primary key" this date?

Please help, Frank


From: Allen Browne on
"Frank Martin" <fm(a)general.com.au> wrote in message
news:Osijfdy8KHA.3276(a)TK2MSFTNGP02.phx.gbl...
> I have a small database and I want to record, in a table field, the date
> at which a record is added (but not edited).

In table design view, add the field to record when the entry was made.

In the lower pane of table design, set the Default Value property of this
field to:
=Date()
if you just want the date. If you want the date and time, use:
=Now()

When you create a form to show the entries, don't provide a text box for
this field, so the user won't have a way to modify the date.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.




From: Frank Martin on

"Allen Browne" <AllenBrowne(a)SeeSig.Invalid> wrote in message
news:%23OMapiy8KHA.1436(a)TK2MSFTNGP06.phx.gbl...
> "Frank Martin" <fm(a)general.com.au> wrote in message
> news:Osijfdy8KHA.3276(a)TK2MSFTNGP02.phx.gbl...
>> I have a small database and I want to record, in a table
>> field, the date at which a record is added (but not
>> edited).
>
> In table design view, add the field to record when the
> entry was made.
>
> In the lower pane of table design, set the Default Value
> property of this field to:
> =Date()
> if you just want the date. If you want the date and time,
> use:
> =Now()
>
> When you create a form to show the entries, don't provide
> a text box for this field, so the user won't have a way to
> modify the date.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.



Thanks, this worked.