Access App login

Hi EE
I need to produce a Login for an access app. I have never done this before so would appreciate some help to get  started

chestera
chesteraAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I see. Well, there are soooo many ways this can be done.  Below is an example.
Basically, you look at the Windows Logged In User name ... then based on that, determine with menu parts to enable disable.

Generically it looks something like this:

    If Environ("UserName") = "SomeName1" Or If Environ("UserName") = "SomeName1"  Then 'more ...
        CommandBars(Index:="zMbQMS").Controls(Index:="Ad&min").Enabled = True
        CommandBars(Index:="zMbQMS").Controls(Index:="Ad&min").Visible = True
    Else
        CommandBars(Index:="zMbQMS").Controls(Index:="Ad&min").Enabled = True
        CommandBars(Index:="zMbQMS").Controls(Index:="Ad&min").Visible = False
    End If

You could have a little local table which Window user names and which menu they should see.

This could would likely go in your app start up code. For example, an AutoExec macro would call a Function in a regular vba module that has code like this ...

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
See if this gives you a jump start:

How to Create a Password Protected Form or Report
http://support.microsoft.com/?kbid=209871

mx
0
 
chesteraAuthor Commented:
DatabaseMX

Not sure if it's a password I need possible my question a bit vague. I have a custom menu. part of the menu contains Manufacturing and Stores. When a user from the store section acesses the app I want them to ony  to access Manufacturing and stores and the rest is disabled. I have the Menu sorted but not sure how to develope a login procedure that is if it's possible

Alan

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
minor type in first line of code...

    If Environ("UserName") = "SomeName1" Or If Environ("UserName") = "SomeName2"  Then  

add as many OR conditions as practical, or use the table approach.

mx
0
 
chesteraAuthor Commented:
DatabaseMX

Many thanks for that. It shoudl get me started

Alan
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
always a pleasure Alan ... post back if you need more help.

mx
0
 
chesteraAuthor Commented:
DatabaseMX

Will do thank you

Alan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.