Results 1 to 8 of 8
  1. #1
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79

    Login access

    i have successfully created a login system



    now the issues is

    for example all users can see form A with a login button - it very complex system

    but if user A logs in he could click a button to see the same form A but should not be able to see the login button on that form, because he logged in, therefore should be able to access other menu or forms that hes allowed to see.

    in simple words there are multiple users but there are forms where both can see so if a user is logged in clicks form A then to go to their forms they have to go to login again , it messes the flow of the system.

    i thought of splitting database but i am not sure, i havent done it before. i backed it up and tried it but i dont know how to do it. i want both users to see the same form, although one form should have more functionality.

    also this database is not in the network or server. it only on local network

    thanks hope i made sense please guide me the right way

    p.s loggin in with correct access levels works it just preventing other users from using certain features on the form and ensuring they kept logged on and not off

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    It's 1 or the other, is it on a network or not? You just said its on both.
    DO split the db via the options in access. SPLIT db tool. It separates the tables from the code/objects.

    as for the login, I have a tUsers table. In it, it has the userID, and their rights.
    Once login authenticates, it opens main menu, gets rights, then enables/disables buttons for them to go to their forms.

  3. #3
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    no it not on the network. it on the computer desktop is what i meant, sorry for confusion.

    i don't know if you understand me. you saying after login, disable buttons for user A but not user b by using access levels - i understand that but my issue is i want both users
    in main menu to go to form A but they should not see the login button. since form A is also used by other users without loggin in.

    in short i want to disable a button after loggin in on form a for users and show button only if not logged in. i do not want to disable the form. just the button

  4. #4
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    ok i found a solution

    if form is loaded during the login session disable button else
    if form is not loaded during the loggin session enable the button. thank you

  5. #5
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    well after playing with the system, it behaving funny, could someone please check the code and see if am doing something wrong

    this is in the login section
    If DLookup("AccessLevelType", "tblEmp", "AccessLevelID = 1 AND Username='" & Me.txtUserName & "'") > 0 Then
    DoCmd.OpenForm "RMenu"
    If CurrentProject.AllForms(formb).IsLoaded Then
    Forms!formb.txtbox1.SetFocus
    Forms!formb.cmdLogin.Visible = False
    End If

    If CurrentProject.AllForms(formb).IsLoaded Then
    Forms!formb.cmdRMenu.Visible = True
    End If

  6. #6
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Have you tried just putting the code in the Form Load/Current event for the form in question? You could get rid of the "isloaded" checks then.

    I would guess the issue is coming from the reference of your objects, can you enter the references into the Immediate window (Ctrl + G)? You can copy and paste the form statements into the immediate window to test if they work. Example, copy and paste

    Forms!formb.txtbox1.visible = false

    while you have the form open on your screen. if the reference was valid you would see it go away. debug debug debug!

  7. #7
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    i need the isloaded checks before i am trying to get two users to the same form after login, and on that page both users will have different form buttons links, for example one user will go to form c after loggin to that form and another user will go to form d. but without login user should be able to see the default form. so basically i went through it again implementing under login section

    first two times works with different forms or controls ofcourse

    when i put it the third time for a different form, it does not work at all, even the previous two form checks wont work

  8. #8
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    never mind, i fixed it, sorry for the trouble

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

Similar Threads

  1. Replies: 2
    Last Post: 04-17-2015, 10:59 AM
  2. Login Screen in Access
    By Di7bash in forum Access
    Replies: 3
    Last Post: 03-18-2014, 11:57 PM
  3. Access Login
    By mithu 1992 in forum Access
    Replies: 1
    Last Post: 10-02-2013, 03:24 PM
  4. admin login on access??
    By rthakral in forum Access
    Replies: 2
    Last Post: 08-21-2013, 12:57 PM
  5. Access login form help
    By Tempuser in forum Forms
    Replies: 8
    Last Post: 09-10-2009, 06:55 AM

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