hi experts, i have problem saving my logout entry could not be saved on database.
Password & username textbox is in the login form on form 1 and lbldate & lbltime is on form 2. Log-out click is a Menu editor on form 2. Pls help me check my code. Thanks a lot.
Private Sub Logout_Click() Set rs = New ADODB.Recordset rs.Open "select*from Logout_Records", cn, adOpenKeyset, adLockOptimistic rs.AddNew rs!Password = Form01.txtPassword.Text rs!Username1 = Form01.txtUsername.Text rs!Logout_Date = Form02.Label1.Caption rs!Logout_Time = Form02.Label2.Caption rs.Update rs.Close Set rs = Nothing Unload Me Exit Sub End Sub