Results 1 to 2 of 2
  1. #1
    mikael is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    24

    login form and filter to specific record


    hello there..

    i am searching for the code of log in page and get the specific record based on the password & username filled. can anyone help me on the code or any example?

    thanks in advance.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you are building your own security for your database you'd have to do a dlookup function to find the PK of the record then bring up your form based that PK

    for instance if you had this:

    Code:
    tblLogins
    PK  User  Pass
    1   AAAA  booger
    2   BBBB   brain
    When someone typed in a user of AAAA with the correct password in your ON CLICK event of the the button that completes the login you would have

    dim iPK as long

    ipk = dlookup("[PK]", "tblLogins", "[User] = '" & forms!frmLogin!User & "' AND [Pass] = '" & forms!frmlogin!User & "'")

    The dlookup would retreive the PK then you just have to base your opened form on the PK you just looked up.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-11-2013, 07:19 PM
  2. open specific form after login
    By manojsikar1 in forum Forms
    Replies: 1
    Last Post: 11-21-2012, 08:54 AM
  3. LogIn Form to filter Main Form
    By ggs in forum Forms
    Replies: 5
    Last Post: 07-12-2011, 04:27 AM
  4. Filter specific records on sub form
    By foxtet in forum Forms
    Replies: 5
    Last Post: 06-05-2011, 12:06 PM
  5. Login form plus filter
    By bjelinski in forum Forms
    Replies: 1
    Last Post: 11-29-2010, 04:34 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