Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TimeStamp

Status
Not open for further replies.

eggy168

Programmer
Mar 6, 2002
220
US
I have a database in Access2000 as a front end and SQL2000 as a back end, and a group of people doing the data entry.

I would like to know is there anyway I can track who and when was the data entered when the record was created? Then I can track who and when was the last time edited the data?

Should I add a field in the Access (front end) or in SQl2000?

Thank You.
 
Doesn't has SQL Server a native TimeStamp field ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes, I added 4 columns in the table,

1) Acceptance_Date - timestamp (which indicates the date that the record created)

2) Created By - char (there is no way to automatic record who created the record unless the person who physcially entered it, I wonder is there anyway the Access automatically accept who's entering it?)

3) Last_Modified_Date - datetime( it doesn't record the data automatic which I would like to make it run automatical everytime anyone who edits the data)

4) Last_Modified_By - char(again, there is no way to record it automatically unless the person who edits the record entering his/her own username)

However, the result doesn't work perfectly, so I wonder is there any way all four of these fields automatically run by itself?

Thank
 
Either use triggers on the SQL side or play with the BeforeInsert and BeforeUpdate form's event procedures on the Access side.
If your database is secured, take a look at the CurrentUser method, otherwise if you don't have win9x box you may consider Environ("UserName").

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV, I don't know either of the way. Is there anyway I can find more information? I am more interesting to work on the SQL side because I can record the information in the table in case I need to run a query instead because all the tables are linked to the Access. Also, running the queries for the time/userID is only interested by managers people, not the data entry people.
Thanks for you help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top