Results 1 to 9 of 9
  1. #1
    putte11 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    18

    Nested instances problem

    HI !
    Making a small project database and is having some problems assigning employees to different tasks.
    This is it.
    I have an employee table, a project table and a task table.
    Now I want to assign an employee as project manager 1proj/1empl working nicely.
    Then I want to create tasks in the project 1 proj/many tasks each task assigned to an employee.
    I run into trubbel when I try to make a form showing the project with the name of the proj-manager and a subform showing tasks
    and the name of the person assigned to the task.
    I can do separate forms but as soon as i link them the name is taken by the project.
    Do you get it?


    Thanks
    Putte11

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    No, don't. Want to provide db for analysis? Follow instructions at bottom of my post.
    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
    putte11 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    18
    No problems
    Its real basic so far to see where Im going. Im just trying to learn this by doing.
    Ok I would like the names in the ritningar subform.
    As I have alread asked for names in the top form Projekt2 through projekt tbl, I cant reach the names from the ritningar (Drawings) tbl.
    I have some swedish letters in there tell me if it causes any problems I can take them away.
    There is also a customer (kund) tbl but thats irrelevant.
    Thanks Patrik

    testdb.zip

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Kund table seems quite relevant as that is the table with namn, tel data you want to show on form Projnr.
    Relationship between Kund and Projnr does not enforce referential integrity. So can there be customers in Kund without a related record in Projnr? Don't use INNER join. Form RecordSource:
    SELECT Projnr.*, KUND.namn, KUND.Tel FROM KUND RIGHT JOIN Projnr ON KUND.Kundnr = Projnr.Kundnr;
    Set textboxes for namn and tel as Locked Yes, TabStop No.

    What names do you need to see in subform? Why?
    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.

  5. #5
    putte11 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    18
    Sorry language problem there the names are anstallda ( employees)
    I need the these guys as project managers and assigned to tasks (ritning= drawings).
    Say I assign a project to Janne and give him two drawings to make then I also want to give Patrik a drawing to make in the same project.
    Kund are customers to the project 1:1 and works nicely.
    And yes I may have a customer without a project.
    I just need his record for a smalljob without a projectno.
    Patrik

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Is Ritare the field to store Anstallda ID value? Make the control a combobox.

    What is Ritare table for? Think I need translation of table and field names to further advise.
    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.

  7. #7
    putte11 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    18
    OK I cleaned out most of it and only kept my problem.
    I want the projectmanagers name in the box in the Projekt form.
    Either I get the name there or in the subform not in both.
    Thanks for your time
    Attached Files Attached Files

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    testdb-modified.zip

    Steps:
    1. Changed the query running your form, it didn't include the project manager field from your table
    2. Your project manager control was unbound, changed that to a bound field to match the rest of your form and included the project manager field
    3. Changed your project manager field to a combo box with the first column being your employee id, the second column being the employee name, hid the first field so only the employee name shows.

  9. #9
    putte11 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    18
    Thank you . That gives me a direction to go. Looks simple but I havent figured everything out yet.
    Patrik

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

Similar Threads

  1. Replies: 4
    Last Post: 09-18-2012, 03:01 PM
  2. Counting instances across multiple tables
    By New_2_Access in forum Queries
    Replies: 1
    Last Post: 07-19-2012, 04:47 PM
  3. Multiple Payment Instances
    By luckysarea in forum Queries
    Replies: 3
    Last Post: 04-21-2011, 03:29 PM
  4. Nested join problem
    By kman42 in forum Queries
    Replies: 2
    Last Post: 03-25-2011, 02:05 PM
  5. Another Nested IIF Query problem
    By Brian Collins in forum Queries
    Replies: 8
    Last Post: 10-22-2010, 10:12 AM

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