Results 1 to 2 of 2
  1. #1
    RedWolf3x is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jul 2011
    Posts
    31

    Combined Table Repeating values

    I'm hoping this turns out to be easier than I'm making it.

    I have two Tables CSRs and Monitors. There are significantly more CSRs than there are monitors. I would like to create a query where the CSRs are listed and the monitors are repeated to the end of the list.


    CSRs
    John


    Mike
    Joe
    Steve
    Susie
    Kelly
    Caryn
    Candi
    Cindy
    Sarah

    Monitors
    Karen
    Michael
    Jenny

    The Results would look like
    CSRs Monitors
    John Karen
    Mike Michael
    Joe Jenny
    Steve Karen
    Susie Michael
    Kelly Jenny
    Caryn Karen
    Candi Michael
    Cindy Jenny
    Sarah Karen

    Please keep in mind that the list of CSRs and the list of Monitors will be forever changing and I need to make the alterations as simple as possible. (No 1 to 1 relations between the CSR and the Monitor), Also to make things a little more difficult I'd like the names to alter with each passing month. (The monitors names would move up one row and another name would go at the bottom).

    Ive just started this portion of the project and do not have any code to start with, but I've made some attempts that have so far failed miserably. Any help is greatly appreciated. Thanks.

    Red

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I don't see how any query can accomplish this. Will require VBA code to assign Monitors to CSRs. Use SQL SELECT to open recordsets in VBA along with nested looping structures. That part is not really difficult as an exercise in programming logic. The tricky part is automating the rotation of Monitors each month. I suggest a field in Monitors table called Rotation that will store the sequence for writing to the CSRs table. Update these values after each monthly run. Use this field as sort order in recordset.

    The procedure would be a Sub that writes the Monitor names to the CSRs table.

    Attempt code and post for analysis when you encounter issue.
    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.

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

Similar Threads

  1. Creating an If Then in a table
    By Mommo in forum Access
    Replies: 2
    Last Post: 08-07-2011, 10:51 AM
  2. Creating a Form without a Table
    By ronocoo in forum Forms
    Replies: 11
    Last Post: 05-21-2011, 04:12 PM
  3. creating unique ID on existing table
    By TheShabz in forum Access
    Replies: 6
    Last Post: 01-24-2011, 03:53 PM
  4. Creating Yes/No Field Using Make Table
    By orcinus in forum Queries
    Replies: 6
    Last Post: 08-19-2010, 11:09 PM
  5. Creating A Table of Random Date
    By kimimaro_kiddo in forum Access
    Replies: 1
    Last Post: 01-01-2010, 10:20 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