Results 1 to 3 of 3
  1. #1
    dgutsche is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    35

    Smile Creating Multiple Records Based on List in a Field

    Hello all!



    I am constructing a database that is composed of two tables, one for tickets and one for cylinders. Each ticket can have up to several cylinders associated in it. When a ticket is submitted using a form I have created I want one of the fields to generate the right amount of records in another table (Cylinders) at the same time that the single record is created in the primary table (Tickets).

    In this field the user would enter a list of numbers. For each number in the list a new record in cylinders is created.

    Ex: User enters "4,7,7,14,28"
    In Cylinders a set of records are created with each of the numbers populating a field called "Break Age"

    I appreciate if someone can give me a push in the right direction even if it's not a full solution. I've been using Excel forums for a couple years with great success (mostly VBA solutions) but I'm upgrading my skills and building my first database. I am having difficulty finding relevant posts - probably because I do not know how to phrase my question.

    Thanks and happy coding / databasing everyone!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Hello and welcome, dgutsche. One reason your question interests me is I work in a materials lab and program our database. I just revised some code that dealt with calculating cylinder break date. How serendipitous is that!

    It should be just as easy for user to enter each number into a single record as it is to type a comma separated string.

    Suggest you use a form/subform arrangement. Main form bound to Tickets table and subform (datasheet or continuous) bound to Cylinders table. No code required and the field with the CSV string is not needed.
    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
    dgutsche is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    35
    Quote Originally Posted by June7 View Post
    Hello and welcome, dgutsche. One reason your question interests me is I work in a materials lab and program our database. I just revised some code that dealt with calculating cylinder break date. How serendipitous is that!
    Ha ha thanks for the welcome! I just wanted to follow up that I think this will definitely get me in the right direction - at work I primarily work in the field and then sometimes work in the office. When I do get around to it I think your approach will work quite nicely! Thanks!

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

Similar Threads

  1. Replies: 3
    Last Post: 04-24-2013, 08:29 AM
  2. Replies: 14
    Last Post: 12-06-2012, 11:25 AM
  3. Replies: 2
    Last Post: 02-28-2012, 12:43 PM
  4. Export multiple records based on a field
    By dskulman in forum Import/Export Data
    Replies: 0
    Last Post: 03-03-2011, 02:44 PM
  5. Replies: 4
    Last Post: 01-25-2010, 04:14 PM

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