Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query won't work

    I have a table called EmployeeIDS. In the table there is a Client manager field which consists of numbers (I join this field to the Client Mgr field in the main table). I also have a field called ASM which consists of numbers which I join to the main table by the field ASM. In the EMployeeIDS table I have a field for employee Ids so that field is populated for both the Client manager and the ASM. When I join the EmployeeID table to the Main table by Client Manger and then by ASM, I bring the EmployeeId field into the query. In the query, I have [forms]![Rep/asm input]![txtRepNo] or [forms]![Rep/asm input]![txtRepNo] is null and
    [forms]![Rep/asm input]![txtASMpNo] or [forms]![Rep/asm input]![txtASMpNo]is Null.
    I also have [forms]![Rep/asm input]![txtempid] for the EmployeeID field.

    On the form that is connected to this query (Rep/asm inpup), I want them to be able to enter in one or the other - Client Manager or Asm but always have to put in the employee id.

    It is not working like I think it should. I thought maybe my employeeID table was setup wrong. I am using one column for the Employee Id which is for both the ASM and The Client manager. I am not sure what I am doing wrong. I have attached a picture of my query.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query won't work

    You should add a second copy of tblEmployeeIDS to the query.
    Delete the line that joins AAData to the original instance of tblEmployeeIDS onAffsmgr Cd 1 vs ASM, and add a line that joins AAData to the new instance of tblEmployeeIDS on Affsmgr Cd 1 vs ASM.
    You'll also have to change the criteria.

  3. #3
    New Lounger
    Join Date
    Sep 2007
    Location
    Pittsburgh, --UNITED STATES of AMERICA--
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query won't work

    Thanks Hans. I did figure that out and I did change the criteria. The query works now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •