Results 1 to 4 of 4
  1. #1
    besuchanko is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    32

    Web Database: OpenForm Macro to Specific Record

    I am trying to build a password form for an Access Web Database. The password form asks for a username and password. The form, frmFaculty_Web, should then open to a specific record that matches the username and password. The username should be FirstName from tblFaculty, and the password should be LastName from tblFaculty. I have to use a macro on the password form to do this because of the limitations of a web database...it will not accept VBA. I cannot get the form to pass the parameters so that the frmFaculty_Web form will open. As you can see I haven't gotten past the first criteria (no idea how to do two). I know it has something to do with the Where clause in the macro. I have no idea how to do it. Can anyone help?? What am I doing wrong??

    The password form has two text boxes: Text0 (username) and Text17 (password).

    Here's a link to the actual database in my Dropbox if that helps:


    https://www.dropbox.com/s/ztt1hswlqx...Database.accdb

    Click image for larger version. 

Name:	macro.jpg 
Views:	14 
Size:	30.0 KB 
ID:	13200

    If I can get this to work, the idea is to eventually populate the table and faculty form so that users can only see and edit their own record. Under no circumstances should they see anyone else's.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Try:
    [LastName]=[Forms]![frmLogin_Web]![Text17] And [FirstName]=[Forms]![frmLogin_Web]![Text0]

    Names as username and password? Not very secure. And what if you have two John Smith?
    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
    besuchanko is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    32
    You are a genious! That makes perfect sense. Thank you. I'm only using first name and last name for testing purposes to get this thing working. That's not what I'll actually use when it is deployed.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You will want to have user enter username and password and use those inputs to lookup UserID and use UserID as criteria to filter form.
    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.

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

Similar Threads

  1. Replies: 14
    Last Post: 07-17-2013, 06:46 AM
  2. Writing macro to go to specific record
    By johnjmcnaughton in forum Programming
    Replies: 18
    Last Post: 04-15-2013, 10:23 AM
  3. OpenForm to specific tab
    By rivereridanus in forum Access
    Replies: 1
    Last Post: 06-28-2012, 07:32 PM
  4. docmd.openform Invalid database object reference
    By snoopy2003 in forum Programming
    Replies: 5
    Last Post: 03-15-2011, 09:11 AM
  5. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM

Tags for this Thread

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