Results 1 to 4 of 4
  1. #1
    macftm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    21

    Presenting User Details on a Form after Filter

    Hi guy, I was wondering if anyone can help me as this is driving me nuts and I'm sure I will be so simple.
    I have a login in screen which is used to verify users details stored in the table T_User_Information.
    Once the User has been verified I want a form (F_User_Profile) to appear so they can rank their progress towards a number of statements and populate a table T_S1PSE_T1.

    At the moment, the user details are verified using the following code:

    Private Sub btnSearch_Click()
    Dim sUserName As String
    Dim sPassword As String
    sUserName = Me.txtUserName
    sPassword = Me.txtPassword
    If DCount("*", "T_User_Information", "UserName = '" & sUserName & "' And Password = '" & sPassword & "'") = 0 Then
    MsgBox "Fail", vbExclamation, ""
    Else
    DoCmd.OpenForm "F_User_Profile"


    End If
    End Sub

    and the form F_User_Profile will open.

    However, the form displays ever record stored in T_User_Information. I want the form to go straight to the specific user's form so they don't have to click on the record arrows at the bottom of the form to locate their specific details.

    I've tried to use the wherecondition related to open form
    DoCmd.OpenForm "F_User_Profile", , , "First Name = '" & Me.txtFirstName & "'"

    but I just keep getting an error 3075.

    Any ideas what I’m doing wrong anyone?????

    Regards

    Macftm

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    For starters, due to the inadvisable space, the field name needs to be bracketed:

    [First Name]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    macftm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    21
    At last, it works!!!!!!!

    Thank you for all your help, time and patience Paul.

    Regards

    Macftm

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 12-12-2011, 01:28 PM
  2. Replies: 1
    Last Post: 12-11-2011, 11:48 AM
  3. Query for user to filter by every field
    By tommy93 in forum Queries
    Replies: 7
    Last Post: 11-07-2011, 04:14 AM
  4. Replies: 3
    Last Post: 04-04-2011, 02:45 PM
  5. Form details not printing
    By Ashe in forum Forms
    Replies: 0
    Last Post: 03-08-2011, 12:27 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