Results 1 to 3 of 3
  1. #1
    robtperk is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    2

    Multi-select records from subform to create records in new table

    I need to create some new records based on main form data and a selection of records from a sub form. The main form and sub form have different sources. I wanted to show the source fields in the sub form along with a check box to allow the users to select individual records. The record source for the sub form contains >1000 records, so the user will first enter data in the main form, use filters to find the records he wants to 'assign' to the main form data, click those he selects, then click a command button in the main form to create the record(s) based on the main form data and the selected records from the sub form. The new records will be appended to a new table. Help is appreciated, especially if you have examples. TIA.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Is this what you want to happen:

    1. User selects records by checking a Yes/No field

    2. Copy records checked yes, something like:
    CurrentDb.Execute "INSERT INTO tablename SELECT <field list here> FROM sourcetablename WHERE Selected = True;"

    3. Reset the Yes/No field back to No for all records:
    CurrentDb.Execute "UPDATE sourcetablename SET Selected = False;"
    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
    robtperk is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    2
    Thanks to June7. I added a select field to my tasks table, then cleared the value after I processed my records.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-16-2013, 11:36 AM
  2. Replies: 3
    Last Post: 01-24-2013, 02:38 PM
  3. Sub form based on table select specific records
    By ReluctantGeek in forum Forms
    Replies: 0
    Last Post: 01-21-2012, 11:24 AM
  4. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  5. How to use a subform to select and use records
    By shiphtfour in forum Forms
    Replies: 3
    Last Post: 01-02-2011, 01:04 PM

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