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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tracking date and time

Status
Not open for further replies.

eshaan

Technical User
Feb 20, 2003
57
US
Hi all,

I need to track date and time to store user's name on table when database or application is open and making changes on forms ,reports ,queries ,macro's and modules.

Anybody have any idea? please help.
 
Hi Eshaan,
I used the following to track username when he/she enters a new record. It goes something like this: Create an unbound form with an unbound cbox (cbxUserID) which can lookup the employee names. Then you store the selected employeeName through a public keyword (lngCurrentEmpID). Ones the employee enters a new record you assign the value to a textbox (EnteredByName) that stores the value in the bound table. To time stamp the new record, create a date variable (DateENtered) and set its default value to Now()

Code:
Private Sub cbxUserID_AfterUpdate()
'this code is written by Evan Callahan
' Copy the employee ID entered to a public variable. Since this
' variable is declared in the Miscellaneous module using the
' Public keyword, it is available throughout the application.

    lngCurrentEmpID = cbxUserID
    
End Sub

Pampers.

You're never too young to learn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top