Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171

    User Login Form

    Friends I am creating a user login form.after studying this article Create User Login form I created form.


    and everything is working fine except this point which I attaching in pic.
    I cannot understand the SQL command for drop down list.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That is the SQL statement for the combobox RowSource property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    yes I create this statement for row source but it is not working.
    when I try to select users from combo, then selection is not working.
    and give message that "control can't be edited bcoz it is bound to autodata field lngempid.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Change field name in tblEmployees from ingempid to lngempid

    Don't bind the combobox - do not set ControlSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    yes now working.
    but there is one other problem.I want that when id and password match and after click log on it jump Switchboard the log on form should be disappear.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You can either close the form or set it not visible. I close my login form. Your code already has line to close the login form but it has the wrong form name. Also need to change the line that follows it to reference the Switchboard form instead of frmSplash_Screen. Fix the form names in the code.

    Also, set the Login form as the default form when project opens.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Yes June I set the login form as default now. And I also change the form name in code so its working now.

    Now I want that without login no one should go in database.bcoz i check without login i can work in other tables and forms.
    secondly I want to hide navigation bar and Ribbon menus.
    I know to hide navigation from option but no idea about Ribbon menus.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Hiding the ribbon and shortcut menus also options for the database. Make those settings the same place as hiding the Navigation pane. Note that pressing F11 will expose the pane unless you also disable the function key. That is done by deselecting 'Use Access Special Keys'.

    Review http://forums.aspfree.com/microsoft-...at-303789.html

    Also note, holding down the shift key while opening db will override most of these project settings.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Thank you but I think this is little bit complicated for me. I will try it later.
    tell me just about this option:
    Now I want that without login no one should go in database.bcoz i check without login i can work in other tables and forms.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    As stated, set these options in the same dialog that you set the navigation pane as hidden. http://office.microsoft.com/en-us/ac...010235717.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    I hide navigation pane but still without logon i can go to file > option and I can enable it again/
    I want that without logon me or no one can go inside database.
    Regards,

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Your procedure has code that if user fails to provide valid password the database shuts down. I did not test that and don't have your db with me now.

    Try it, what happens? Debug. Review link at bottom of my post for debugging techniques.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    I am attaching my db again.
    Plz you check and tell me.
    Last edited by glen; 09-15-2012 at 06:53 AM.

  14. #14
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    I modified this code in db like this.

    'If User Enters incorrect password 3 times database will shutdown

    LogonAttempts = LogonAttempts + 1
    If LogonAttempts > 3 Then
    MsgBox "You do not have access to this database.Please contact admin.", _
    vbCritical, "Restricted Access!"
    Application.Quit
    End If

    this is the real code.


    'If User Enters incorrect password 3 times database will shutdown intLogonAttempts = intLogonAttempts + 1 If intLogonAttempts > 3 Then MsgBox "You do not have access to this database.Please contact admin.", _ vbCritical, "Restricted Access!" Application.Quit End If

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    It works? Issue resolved?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. HELP>Access 2010 User Login Form Code.
    By zaaimanm in forum Programming
    Replies: 5
    Last Post: 10-22-2012, 07:28 PM
  2. User Login
    By winterh in forum Forms
    Replies: 6
    Last Post: 03-14-2012, 06:01 PM
  3. Multi- User Login
    By Tom Lovick in forum Access
    Replies: 1
    Last Post: 02-11-2012, 12:20 PM
  4. Replies: 1
    Last Post: 12-11-2011, 11:48 AM
  5. Replies: 3
    Last Post: 09-22-2011, 03:35 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