Hello need some assistance

U

usul.the.mouse

I would like to have a field in a table that the value defaults to
either
a custom function that I wrote in a module or the CurrentUser property.

i.e
Table tblWhatEver
Field1
Field2
sysCreatedDate
sysCreatedByID

where the
sysCreatedDate defaults to now()
sysCreatedByID defaults to the current user.

I am using MSAccess 2003

Thanks in advance for your help,
Usul
 
J

Jeff Boyce

Rather than have the table provide these, consider doing your data
entry/edit via Access forms. You would use the BeforeUpdate event of the
form to:
validate values in your controls, and
set values that you didn't want to bother the user with (e.g., your
CreateDate, CreateBy)

You might also want to consider adding fields to the table to hold two more
values, LastUpdated and UpdatedBy. You would use a similar approach in your
form to set these values.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top