Creating a Date Stamp for each record

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi everyone :)

I have a database and to which I have added a field called Date Stamp that
automatically places todays date in the newly created record. This was done
via the properties screen for the table - going to the Date Stamp field and
using date() as the default value.

This works a treat but now I would like to protect the Date Stamp field so
that the date cannot be changed.

I am not concerned if the date cannot be changed ever again - even better in
fact! :)

I was hoping there was an expression that could be created to validate the
date and prevent changing it from it's original value.

I was thinking that one way would be for the newly created date to be
entered in to a new Date Stamp ID table and linked to an ID which was unique
to that date. The expression could then refer to the Date Stamp ID table and
ensure that only the date linked to the code would be valid.

The truth is I wouldn't know how to build this expression and I am probably
talking utter nonsene anyway :)

Any help would be greatly appreciated.

btw

I cannot use users, groups and permissions etc as it is an ad hoc setup in
the work place ;)

Many thanks for your time and consideration

Martin
www.accepted-designs.com
 
Martin said:
Hi everyone :)

I have a database and to which I have added a field called Date Stamp that
automatically places todays date in the newly created record. This was
done via the properties screen for the table - going to the Date Stamp
field and using date() as the default value.

This works a treat but now I would like to protect the Date Stamp field so
that the date cannot be changed.

Dead simple - set the text box's "Locked" property to "Yes".

Keith.
www.keithwilby.com
 
I have a database and to which I have added a field called Date Stamp that
automatically places todays date in the newly created record. This was done
via the properties screen for the table - going to the Date Stamp field and
using date() as the default value.

This works a treat but now I would like to protect the Date Stamp field so
that the date cannot be changed.

I am not concerned if the date cannot be changed ever again - even better in
fact! :)

As this is the 'security' group, you could use permissions. Create a
VIEW (virtual table, stored query) that exposes all columns of the
base table except the 'Date Stamp' column, remove permissions from the
base table and grant them instead to the VIEW, then use the VIEW in
place of the table.

Jamie.

--
 
Back
Top