I came across a script which should enable me to hide tool bars from users of the database. The code is as follows
Dim vUser As String
vUser = Environ$("UserName")
If vUser = YOURUSERNAME Then
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
Else
End If
End Sub
'END OF SUBROUTINE
The script works if I run it, but without entering a user name and password - all toolbars are hidden. I can't figure how get the user to enter the username and have the name passed to it. I have tried using the security section from the tools menu on the main database window without success. Can anyone please advise me on this?
Many thanks
Peter
Dim vUser As String
vUser = Environ$("UserName")
If vUser = YOURUSERNAME Then
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
Else
End If
End Sub
'END OF SUBROUTINE
The script works if I run it, but without entering a user name and password - all toolbars are hidden. I can't figure how get the user to enter the username and have the name passed to it. I have tried using the security section from the tools menu on the main database window without success. Can anyone please advise me on this?
Many thanks
Peter