Page 1 of 3 123 LastLast
Results 1 to 15 of 34
  1. #1
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38

    projects database save listbox selections

    I have a database in which I have a projects and an employees table. I have a form that allows users to create a new project. I have a button on that new project form that says "Assign Employees" which opens another form. The Assign Employees form has two listboxes in which you can move members drawn from the employee table to the right and back to left to determine the work group desired to work on the new project being created in the new project form. I can't figure out how to make the selected employees, now in the right listbox, to display on my original form, and after the new project is saved, to save all the project info, including the assigned employees to the Projects table. I also would like users to be able to click the assign employees button again to be able to change their selection if they change their minds Please help!! I've attached my database.
    Thanks so much!
    Last edited by taya621; 01-21-2011 at 09:49 AM.

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I cannot open your database here at work since I only have Access 2003. If a project has many employees associated with it; that describes a one-to-many relationship which requires a separate but related table to hold those employees associated with the project. The question, can an employee be associated with many projects (over time)? I would guess that would be the case, so to structure that, you would need something like this:

    tblEmployees
    -pkEmpID primary key, autonumber
    -txtFName
    -txtLName
    (other employee fields)

    tblProjects
    -pkProjID primary key, autonumber
    -txtProjectName
    (other project fields


    tblProjectEmployees
    -pkProjEmpID primary key, autonumber
    -fkProjID foreign key to tblProjects
    -fkEmpID foreign key to tblEmployees

  3. #3
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    Hello ruralguy,
    Thanks for your response. I created the tables that you said and I made the relaionship. However, When I selecte the employees from my left listbox and move them to my right and click save, nothing happens. I put the controlsource of the right listbox as the column on the Employee table where I want the employees listed and it didn't work. Nothing gets affected when I move the names around, it looks like. I want to attach my database but after adding that table it is 532 KB and so the forum wont' let me add it. I included a screenshot of what my selecting employee listboxes look like, the new project form with the space where i want the chosen names listed, and finally the table which has the column "assigned members" where I want the name sof the assigned employees to be saved when the new project is submitted.

    Thank you!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Re: posting your db. Compact and Repair and then ZIP the db. The limit is then 2MB.

  5. #5
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    how do I do that?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Compact and Repair in ac2010? File>CompactAndRepair
    ZIP in WinXP? From Windows Explorer RightClick>SendTo>CompressedFolder

  7. #7
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    You are fantastic, thanks for being so patient with me, its attached with a few changes of me attempting to display the names on the original form but its not quite doing what I need it to. Lets work on getting the info to save on the table first tho
    Last edited by taya621; 01-21-2011 at 09:50 AM.

  8. #8
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    I hope everything's ok...?
    Thanks!

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Actually even though you credited me, it was jzwp11 that offered assistance and I was waiting for that poster to jump back in. They were off line for a while but I expect the ball to be picked up shortly. I'll stay tuned though.

  10. #10
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    Oh! I didn't even notice, thanks J.
    Ruralguy,
    Do you think my database is worthy of help Your expertise is unmatched ! Please let me know what you can do, thanks!!

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When I get a chance I'll take a look at it. My hands are pretty full at the moment, sorry.

  12. #12
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    That's ok, whenever you get a chance. I appreciate any help. Quick question though, how do you get listbox items to be saved to somewhere?
    Thanks!

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It may be a quick question but I do not have a quick answer or a link to offer.

  14. #14
    taya621 is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Jan 2011
    Posts
    38
    Ok no problem, thank you again for all your help!

  15. #15
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I didn't realize that you had Access 2010; I only have Access 2007. Is there any way to save your DB in an Access 2007 format and post that?

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 01-20-2011, 02:22 PM
  2. Replies: 1
    Last Post: 07-10-2010, 10:36 AM
  3. Using Access Projects
    By ragsgold in forum Access
    Replies: 4
    Last Post: 10-24-2009, 04:23 AM
  4. report to compare projects' targets
    By Arest in forum Reports
    Replies: 0
    Last Post: 07-29-2009, 09:04 AM
  5. Replies: 0
    Last Post: 02-16-2009, 08:21 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