Results 1 to 3 of 3
  1. #1
    PeterNeville is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    1

    Replicate Data with a button

    I have two tables tableManager and tableEmployees with one to many relationship. In a form I have two cascading listboxes: one listbox listManager with row source as table and another listbox listEmployees with row source value list. I have manually entered 10 employees under a single manager Manager A. Now, I am creating a new record say Manager B via a text box and adding it to the table tableManager.


    Is there a way to add all the 10 employees, previously under Manager A, under a Manager B also, with the help of a button? Basically i want to replicate the previous combination of records to a new record. Hope I have made myself clear. I am a newbe in access. A little help with the code will help me a long way. Also pardon me if my english is a bit vary.

    Peter

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    You are describing HOW you want to achieve something. What is it exactly you are trying to accomplish?
    Sounds like recording who is manager/boss of whom.
    Also sounds like everyone is an Employee.

    You might consider an Employee table where every employee has a unique identifier (eg.EmpID), and along with info about each Employee, another field ReportsTo where you record the EmpId of that Person's Manager/Boss. Top Honcho has some unique ReportsTo identifier ( eg:000 ) which means she/he is the uberLeader and Reports to Nobody. This structure allows you to have multilevel hierarchies. As I said --for consideration.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I have two tables tableManager and tableEmployees with one to many relationship...
    Is there a way to add all the 10 employees, previously under Manager A, under a Manager B also
    This reads like it's a many to many relationship, in which case you're probably missing a table. Seems to me like you'd need tblMgrs, tblEmployee and tblMgrEmpl, the 3rd being a junction table. I might have misunderstood the post, though.

    and another listbox listEmployees with row source value list.
    I'm not getting how this is cascading at all. One is a full table list and the other is a value list? I've never heard of "cascading" when a value list is involved in a 'child' control.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-13-2015, 02:45 PM
  2. Replies: 1
    Last Post: 04-10-2015, 11:48 AM
  3. Need to replicate data in 2 tables
    By magister011 in forum Access
    Replies: 5
    Last Post: 11-02-2009, 04:55 AM
  4. Replicate Contains Function?
    By billt568 in forum Queries
    Replies: 0
    Last Post: 10-26-2009, 09:58 AM
  5. Replies: 5
    Last Post: 09-16-2009, 01:56 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