[b][red]This message was edited by BigPete85 at 2007-1-4 12:11:19[/red][/b][hr]
I created a simple log in screen, nothing too facny with this code
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
If IsNull(Me.txtlogin) Then
MsgBox "Please enter a valid user name.", vbExclamation, "Error"
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter a valid password.", vbExclamation, "Error"
rs.Open "SELECT * FROM logininformation WHERE(login = """ & txtlogin.Value & """ AND password = """ & txtpassword.Value & """)", _
CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If rs.EOF Then
MsgBox "Invalid user name or password. Please try again.", vbExclamation, "Error"
MsgBox "Login Successful.", vbInformation, "Confirm!"
What i would like to do is put a time stamp in the record for each time the log in was sucessful.
The fields in the Login Table are : Login, password, Date
So whenever there is a successful login, the date field in the table will update to time of the login. I know the code is =Now() to get the exact time of the current date. But how do i update the table with the current date for that record when the login is successful?