Results 1 to 6 of 6
  1. #1
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60

    login form and main form


    how can I create login form that it opens on main form and if login successfully it closes and shows main form and if login unsuccessfully alert. thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Login form is a common topic. Search forum or google. Here is one to start https://www.accessforums.net/program...ord-32218.html
    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
    sherryb41 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    17
    Here is one you can modify. Denis Wright was so kind to share it with me.
    Attached Files Attached Files

  4. #4
    sherryb41 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    17
    I might not be any hlep to you, but if you are good at figuring things out this may help. Good luck.

    I forgot to include his instructions for the database above:

    You will need to do the following:

    1. Unzip the Password items database
    2. Open a database that you want to use the password system on, and import everything from Password items (tblAssociate, frmPassword, Gearbox, and the 2 code modules)
    3. Edit tblAssociate to enter your user name and other details.
    4. Launch frmPassword, enter your name and password and hit OK. The Switchboard should launch.


    That shows how to get to the Switchboard via a login. Now, for EVERY form where you want the read-write-edit permissions to be varied, you need to copy the code that is in the Form_Open event of Gearbox and paste that into the code module for each form. That code is

    Private Sub Form_Open(Cancel As Integer)
    Select Case gintLevel
    Case 1 'read-only
    Me.AllowEdits = False
    Me.AllowAdditions = False
    Me.AllowDeletions = False
    Case 2 'edit existing records
    Me.AllowEdits = True
    Me.AllowAdditions = False
    Me.AllowDeletions = False
    Case 3 'create, add new, delete
    Me.AllowEdits = True
    Me.AllowAdditions = True
    Me.AllowDeletions = True
    End Select
    End Sub

    If you haven’t done this before, here are the steps:

    1. Open the form in Design view
    2. In the Properties go to Events, and find the On Open event.
    3. Double-click the blank line so you see [Event procedure], then click the … at the end of the line. You should then see


    Private Sub Form_Open(Cancel As Integer)

    End Sub

    Replace that with the code above, close and save the form
    Now when that form is opened from the switchboard the users should have the editing privileges defined by their level (see comments in the code).

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    There is one here on the forum FYI. I uploaded it myself a while back.

  6. #6
    msasan1367 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2013
    Posts
    60
    find:
    Code:
    https://www.accessforums.net/access/open-form-another-form-32673.html#post166114

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

Similar Threads

  1. Replies: 2
    Last Post: 11-13-2012, 02:11 PM
  2. Replies: 3
    Last Post: 05-31-2012, 02:49 PM
  3. Replies: 1
    Last Post: 12-11-2011, 11:48 AM
  4. Login form with nt login
    By hitesh_asrani_j in forum Forms
    Replies: 6
    Last Post: 09-22-2011, 11:43 AM
  5. LogIn Form to filter Main Form
    By ggs in forum Forms
    Replies: 5
    Last Post: 07-12-2011, 04:27 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