473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

programatically allow full menus on form load based on username

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
1 7549
ADezii
8,834 Expert 8TB
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

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

Similar topics

10
by: PC Datasheet | last post by:
How can I programatically set the startup form when the database opens? Thanks! Steve
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
4
by: Andrea Williams | last post by:
Does anyone know of some in depth documentation regarding how to add user controls programatically? I have a User Control, which has some basic html controls, and depending on the number selected...
3
by: Steven Smith | last post by:
the way I'm undersatnding the MSDN documentation when creating parent and child forms the main menu for the child form should not be displayed on the child form itself but instead be incorporated...
1
by: Nick via .NET 247 | last post by:
I have a similar problem trying to use web services with awindows form application. I currently use a static web referencein my project. What I am trying to do is to programaticallychange the url...
12
by: Steve_Black | last post by:
I posted a similar message earlier but we've geared away from the original topic somewhat so I thought I'd post again in hopes of getting input from others. I am creating a MenuStrip...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
1
by: mchlle | last post by:
I need for a form to display certain records based on the user. If current user = user1 or user2 then open frmNotesAll If current user = user 3 then open frmNotes where counselor id = 2 or 6 or...
9
by: hrreece | last post by:
I have an Access 2002 database that has a form that can be used to review individual records. At the bottom of the form are buttons that are linked to functions that allow the user to "Find a record...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.