populating hidden fields on record save

  • Thread starter Thread starter Theresa via AccessMonster.com
  • Start date Start date
T

Theresa via AccessMonster.com

I am working on a database that 3 people will be entering data into at the
same time. I want to save the user ID of the person who entered the record
and the date and time it was saved. They will be filling in information
for four different tables on one form. I have two hidden fields (one for
user ID and the other for the date and time). I want to populate these two
fields only when the record is saved. I have the default value for the
date and time set to Now(). Where do I put the code to populate the user
ID? Not every field on the form will be populated. The data entry clerks
will have several options for saving a record (clicking on a save button at
the bottom of the form, by using the enter or tab keys on the last field,
or by clicking on an add new record button). Do I need to call my function
that gets the UserID from the system from every possible way of saving the
record? Or is there one event for the form that I can use?

Thanks in advance!
Theresa
 
I have another question. If I have the user ID set to Required in my
table, can I use the AfterInsert event to populate that field? Or is there
a better way to accomplish this?

Thanks!
Theresa
 
Back
Top