Results 1 to 7 of 7
  1. #1
    Crystan is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018
    Posts
    22

    information on MS Access login limitation

    I have a project I'm having difficulty with.

    I have a database, and a set of forms.
    You search for a product, and load the settings.
    The settings for machines and sizes ect load up on the form with the latest updated entry. No problem!

    I need to add logins.

    I have an "Edit Settings" that loads up a new entry (different version number) with all the previous settings preloaded. I need to add the following (if it can be done)

    Login with 4 types of authorisation.
    level 1 - unlocks that bulk size and one ingredient alterations
    level 2 - unlocks above and oven settings
    level 3 - unlocks above and mixing energy usages


    level 4 - above and unlocks all fields

    Once logged in, you make the alterations and save. This information is then logged with the new version number in the table but also is logged in a seperate report of your changes made for reference, with your login details/date/time ect

    Can this be done? I'm having trouble with this.

    I have tried to add a column in the login table with the forms names but nothing. To be honest I am clueless on this...

    Kind Regards

    Crystan

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    have a tUser table with their limittaion codes:
    cXavier, 4
    Logan, 3
    JGrey, 1

    then the db opens, grab the useriD
    then with that , grab their Level from the tUsers table.
    then enable buttons/objects:

    Code:
    public gvUserID, gvLevel
    Code:
    sub form_Load()
    gvUserID = getUserID()
    gvLevel = getUserLevel()
    'then turn on/off buttons
    'all buttons start disabled
    
    btnAdmin.enabled = gvLevel = 4
    btnManager.enabled =(gvLevel = 4) or ( gvLevel = 3)
    btnLookup.enabled = (gvLevel = 4) or ( gvLevel = 2)
    end if


    Code:
    Public Function getUserID() As String
    getUserID = Environ("Username")
    End Function
    Code:
    Public Function getUserLevel() As String
    getUserLevel= Dlookup("[Level],"tUsers","[UserID]='" & gvUserID & "'") & ""
    End Function
    

  3. #3
    Crystan is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018
    Posts
    22
    I think I messed it up... Can't get the login part to work.

    Added a little login form, but data isn't transfered between the forms. Also I can't get the matching sub form to open up once login details entered... unfortunately I cannot post it here for you to have a look at as it is over the file size limit for posting here

    How it runs is:

    Main Menu - select the SKU by typing it in - works
    After it has found the SKU, it will load all the settings up on a form - works
    There are 3 buttons across the top. GO TO LAST - shows the last version entry (latest settings) - works, New Search - reloads the search box (previous step) - works, and CHANGE REQUEST - opens up an edit form - works

    Change Request form - has a few things that aren't happening.
    When opened, the previous forms SKU number and SKU name, dont load.
    There is a login button on the top that opens a basic username/password form, but after login in, the details aren't transfered back to the change request form
    Also there are 4 sub forms, each allowing access to only certain parts. None of which open

    Sub Form names:
    Sub_frm_lv1,
    Sub_frm_lv2,
    Sub_frm_lv3,
    Sub_frm_lv4

    USERS table columns
    ID, Password, Name, Lv (digit 1-4)

    Important fields in the recipe table - "AUTH" should update with the user ID when entry saved

    Can this be done? I'm hitting walls due to absolutely no idea in regards to logins

    Kind regards
    Click image for larger version. 

Name:	0101010.png 
Views:	17 
Size:	46.7 KB 
ID:	41229

  4. #4
    CarlettoFed is online now Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    274
    Maybe if you attach a file of what you've done it's easier to help you

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Suggest you remove most of the data from a copy of your dB, compact and zip it for someone to look at.

    If you can't follow Ranman's advice for logins, I suggest you look at my example login form at http://www.mendipdatasystems.co.uk/p...gin/4594469149
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    Crystan is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018
    Posts
    22

    file share

    MASTER_SETTINGS_TRIAL.zip

    compressed file

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi,

    Please have a look at this and see if that is what you wanted. I suggest you don't use variations of the same object (=form) for each each level, but instead try to dynamically restrict/allow functionality based on the user level. Have a look at my free utility that allows you to setup any number of levels and restrict/allow visibility/functionality: http://forestbyte.com/ms-access-util...access-levels/.

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 01-23-2018, 10:06 AM
  2. Replies: 13
    Last Post: 05-29-2015, 11:32 AM
  3. Printing of login information
    By undee_69 in forum Programming
    Replies: 2
    Last Post: 05-21-2014, 07:59 AM
  4. Replies: 1
    Last Post: 02-17-2013, 04:46 PM
  5. Windows User Login Information
    By MintChipMadness in forum Programming
    Replies: 6
    Last Post: 08-07-2012, 05:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums