Results 1 to 2 of 2
  1. #1
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102

    Running a Query based upon UserName

    I have a database that requires a login with both User Name and Password.



    I have various queries that select records based upon a field specific to each user.

    My question is how do I run a specific query based on the UserName (that is a TmpVar)?

    Thanks for your input.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    in the main form , load them into a text box, txtUser

    on form load
    txtUser =Environ("Username")
    (or your method)

    then queries look at text box
    select * from table where [userID] = forms!frmMain!txtUser

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

Similar Threads

  1. Replies: 14
    Last Post: 08-17-2015, 02:32 AM
  2. Replies: 1
    Last Post: 02-17-2013, 04:46 PM
  3. Replies: 2
    Last Post: 04-06-2012, 11:20 AM
  4. Message popup based on USERNAME
    By jpkeller55 in forum Access
    Replies: 3
    Last Post: 12-19-2010, 09:51 PM
  5. Running a query based on 2 combo boxes.
    By blessoni in forum Queries
    Replies: 4
    Last Post: 12-12-2010, 02:09 PM

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