Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32

    Splitting Tables

    What is the easiest way to split tables that already have data in them? I have a main table from which I need to extract 2 separate tables. I don't want to lose any of my data that I have already input.



    TIA, Rox--

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    If you need to select some of the rows in a table to use elsewhere in the project, that's what queries can do.
    Maybe you need to explain what the 'separate tables' are for, then we can see if queries can satisfy the requirement.
    What values decide what rows are extracted?

  3. #3
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    The tables are "Venues" and "Contacts" from the main table "tblCraftShows"

    CraftShowsV33.zip

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    CraftShowsV34.zip
    Added a couple of "create table queries" to create tblTestVenue and tblTestContacts.
    Queries are examples. I ran the queries and the tables exist.
    If you run the queries again, in the new tables you will have to manually create the Primary key, and change the created CraftShowID_PK from autonumber to number and change its name to CraftShowID_FK.
    You might want to avoid this and just use the tables I created and change their names (remove the 'test') if they look OK.
    These new tables will also need to be set up properly in the relationship window after changing their names to the final name (without the 'test').
    Last edited by davegri; 10-08-2017 at 11:39 PM. Reason: more detail

  5. #5
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Hi Dave, all I got was the laacdb file.

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    Oops. Zipped up the wrong guy. Maybe this one.
    CraftShowsV34.zip

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    CraftShowsV35.zip
    This db incorporates the new split out tables.
    Also got rid of tbluSpecs - put specname in tblSpecs.
    Added subforms for contacts and venues. Getting a little messy with all the subforms.

  8. #8
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    I was thinking the same thing. I wonder if I made a general form, then put buttons for pop-ups - if that would look any better.

  9. #9
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    Is it safe to remove the contact and venue fields from tblCraftShows?

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    You bet. Any fields moved to another table and shown in any of the subforms doesn't need to be in tblCraftShows.
    And I already removed all those unneeded _FK fields.

  11. #11
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    What about doing the pop out forms?

    "I was thinking the same thing. I wonder if I made a general form, then put buttons for pop-ups - if that would look any better."

  12. #12
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    CraftShowsV36.zip
    Another approach, to control subform sprawl, would be to put each subform on a tab control. The tab Control would be on the craftshow form. Clicking on each tab would show the corresponding subform, one at a time.

  13. #13
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    would you mind pointing me in the right direction on how to do this? (an article, or something)?

  14. #14
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    I added the attachment to post #12.

    Going out for a few hours. Maybe be back 10PM MDT.

  15. #15
    roxdrob is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    32
    This is great! I love it. Thank you!

    Now, can I remove the ID's from view? I tried to set "visible" to No, but it didn't change anything.

    Also, the State ID shows instead of the state name. How would I change that?

    I'm working on a laptop and the page keeps going to the bottom when I change tabs. I've tried changing the size of the table, background and footer, but nothing is happening. Is this something I'll just have to live with?

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

Similar Threads

  1. Replies: 11
    Last Post: 09-07-2017, 09:20 AM
  2. Require help splitting/linking tables
    By dyankov.savin in forum Access
    Replies: 5
    Last Post: 03-06-2015, 08:39 AM
  3. Splitting tables
    By MTSPEER in forum Access
    Replies: 7
    Last Post: 06-04-2013, 06:47 AM
  4. splitting tables to manage their size
    By aat in forum Database Design
    Replies: 5
    Last Post: 09-22-2010, 12:47 PM
  5. Splitting an Excel File into Multiple Access Tables on Import
    By TheWolfster in forum Import/Export Data
    Replies: 4
    Last Post: 04-29-2010, 04:52 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