By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 2,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

programatically allow full menus on form load based on username

P: 1
I'm trying to allow full menus based on network usernames. Right now I'm showing the database table for the username "james". Anyone know how to do that programatically?

If LCase(Environ$("Username")) = "james" Then
'Show database window
DoCmd.SelectObject acTable, , True
End If
Dec 20 '07 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,600
I'm trying to allow full menus based on network usernames. Right now I'm showing the database table for the username "james". Anyone know how to do that programatically?

If LCase(Environ$("Username")) = "james" Then
'Show database window
DoCmd.SelectObject acTable, , True
End If
Something similar to this:
Expand|Select|Wrap|Line Numbers
  1. Select Case LCase(Environ$("Username")) 
  2.   Case "james", "thomas", "fred"
  3.     CurrentDb.Properties("AllowFullMenus") = True
  4.   Case "wally", "jesse","nicholas", "paul"
  5.     CurrentDb.Properties("AllowFullMenus") = False
  6.   Case Else
  7.     'your call here
  8. End Select
Dec 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.