R
rbeach
I am not a programmer, but I need to set a value in a table automatically
when a form is opened. This will toggle from Yes to No each time the form is
opened. Below is the code I currently have in place. I am sure this only sets
the variable, not the table value. Please let me know what I need in place.
Private Sub Form_Open(Cancel As Integer)
Dim fLogout As Boolean
fLogout = DLookup("[LogOutUser]", "[LogoutTable]")
If fLogout = True Then
fLogout = False
Else
fLogout = True
End If
End Sub
when a form is opened. This will toggle from Yes to No each time the form is
opened. Below is the code I currently have in place. I am sure this only sets
the variable, not the table value. Please let me know what I need in place.
Private Sub Form_Open(Cancel As Integer)
Dim fLogout As Boolean
fLogout = DLookup("[LogOutUser]", "[LogoutTable]")
If fLogout = True Then
fLogout = False
Else
fLogout = True
End If
End Sub