What is that? Describe what you want to do.How to create a logout navigation button?
Not very helpfulI want to add a logout button
Public Sub LogOut()
Dim frm As Access.Form
For Each frm In Forms
DoCmd.Close acForm, frm.Name
Next frm
Application.TempVars("tempCurrentUser") = Null
Application.TempVars("loginCorrect") = False
DoCmd.OpenForm "frm_login", , , , , acDialog
End Sub
Just to be clear that is not meant to go in a module. That is an example of how you would call the code that is in a standard module.There is an compile error: expected variable or procedure, not module
Private Sub cmdLogOut_Click()
LogOut
End Sub