Record Creation Date

  • Thread starter Thread starter Guest
  • Start date Start date
Only if your table includes a DateTime field with default of Now() so that it
stores the date and time when the record is created.
 
AFAIK, not in Access unless you do your own DateTime stamp field and code.
 
Only if your table includes a DateTime field with default of Now() so that it
stores the date and time when the record is created.

Did you test a little? There's more to it than that:

CREATE TABLE PrivateTest
(
ID INTEGER NOT NULL UNIQUE,
date_stamp DATETIME DEFAULT NOW() NOT NULL
)
;
INSERT INTO PrivateTest (ID, date_stamp)
VALUES (1, #1990-01-01 00:00:00#)
;
SELECT ID, date_stamp
FROM PrivateTest
;

Oops! That row didn't get the correct timestamp i.e. not today's date.

The 'timestamp' column should perhaps be hidden:

CREATE VIEW PublicTest (ID) AS
SELECT ID
FROM PrivateTest
;
INSERT INTO PublicTest (ID)
VALUES (2)
;
SELECT ID, date_stamp
FROM PrivateTest
;

Now REVOKE permissions from PUBLIC on the base table and grant them
instead to the VIEW.

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top