Results 1 to 10 of 10
  1. #1
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142

    Query to Pull all the records


    Hi
    I have EmpToProj form. Here an employee is allotted to Element "Terminal"
    I want the employee who doesn't allocated to Terminals should have all the elements in the lstassigned table.

    Say in the form: Employee : Upchunk Schumer should have both the elements in the "lstAssigned"

    Upchunk Schumer
    Terminal
    Junction Cl
    I have attached the Db fro your reference.
    Could you please help me with this.
    Attached Files Attached Files

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I'm not sure I understand. You have to select Upchunk Schumer, then ADD the projects to the EmpToProj table. It seems to be working.



    But I have to say, I think it would be easier to use a Main form/sub form set up.
    You could have Main form of Employees and use the sub form to assign projects. You will see which projects are assigned to an employee.
    And you could have a main form of Project and sub form to assign employees. You would be able to see which employees are assigned to which project.

  3. #3
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142
    No . I am working on segregating Employees who work on terminal. So the employees who work on terminals are already been placed under terminals and the respective projects in the lstAssigned .
    Now I want the rest of the Employees to be placed under all the projects including the terminals.



    QUOTE=ssanfu;405963]I'm not sure I understand. You have to select Upchunk Schumer, then ADD the projects to the EmpToProj table. It seems to be working.



    But I have to say, I think it would be easier to use a Main form/sub form set up.
    You could have Main form of Employees and use the sub form to assign projects. You will see which projects are assigned to an employee.
    And you could have a main form of Project and sub form to assign employees. You would be able to see which employees are assigned to which project.[/QUOTE]

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Can you check the updated file to see if that is what you want?

    Cheers,
    Vlad
    Attached Files Attached Files

  5. #5
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142
    That's what I was looking for. But the LstAvailable shouldn't be empty? If all the projects are there in the LstAssigned.



    Quote Originally Posted by Gicu View Post
    Can you check the updated file to see if that is what you want?

    Cheers,
    Vlad

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Look at the afterupdate event of the lstRmployee to see my changes and add lstAvailable.rowsource="" if the dvount=0.
    Vlad

  7. #7
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142
    Okay will do the changes.


    Thank you!!


    Quote Originally Posted by Gicu View Post
    Look at the afterupdate event of the lstRmployee to see my changes and add lstAvailable.rowsource="" if the dvount=0.
    Vlad

  8. #8
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142
    There is a small problem.
    I shouldn't alter the employeetoProject table.

    In the create Entry form.
    Employee who are assigned to terminal are shown.
    So when an employee is selected.
    The terminal projects are taken from the EmpToPRoj table.
    Employees who are not in the Terminal projects, should be displayed with all the elements. This is by not altering the EmpToProj table. Elements and projetcs should be taken from Elements and projecst table directly.
    I have attached the Db for reference.
    Attached Files Attached Files

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Sorry but I don't understand what you want. Can you explain in more detail the problem showing some example(s) and the desired solution with some example(s) as well. You are talking now about another form, is this related to the original question?

    Cheers,
    Vlad

  10. #10
    Shamli is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jul 2018
    Location
    California
    Posts
    142
    I am sorry. This is not the same question but its linked.
    I will create a separate thread for it.

    Thank you so much for your help.[

    QUOTE=Gicu;406028]Sorry but I don't understand what you want. Can you explain in more detail the problem showing some example(s) and the desired solution with some example(s) as well. You are talking now about another form, is this related to the original question?

    Cheers,
    Vlad[/QUOTE]

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

Similar Threads

  1. Query doesn't pull all records
    By tbjmobile@gmail.com in forum Queries
    Replies: 13
    Last Post: 02-24-2018, 05:53 AM
  2. Replies: 2
    Last Post: 10-29-2015, 12:38 PM
  3. Replies: 1
    Last Post: 04-10-2014, 12:55 PM
  4. Query to pull a percentage of records by user
    By Xarkath in forum Queries
    Replies: 15
    Last Post: 03-21-2014, 11:43 AM
  5. Replies: 2
    Last Post: 05-08-2013, 03:37 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