Results 1 to 10 of 10
  1. #1
    Clifford86 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    27

    Creating Table from column data in another table.

    Hello,



    Is it at all possible to have Access take data from one table's column and use the data in a new table as its columns based on the data from the first table?

    Example:

    tbl_ criteria:
    ID
    Type
    -data1
    -data2
    -data3
    -data4
    -data5
    -data6
    -data7
    Description

    tbl_updated_table:
    ID
    data1
    data2
    data3
    data4
    data5
    data6
    data7

    The tbl_criteria column will not have a lot of data in the type column and the cell data will not be changing much if at all. Though the tbl_updated_table will be getting new data all the time in the different columns.

    I know that I can go and manually update the table columns. Though it would be a lot easier to set it up to automatically update, by running a macro or something to update the table. As most systems will just be running the Access Runtime and not the full Access software. So I will not always be able to quickly update the tbl_updated_table.

    Best regards,
    Clifford86

  2. #2
    madpiet is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    172
    What problem are you trying to solve?
    Sure you could create a query that returns the data you want (from the source table) and then subtract (well, in terms of sets... use an outer join to get the records that are in this query but not in the final destination table) and then append. But why? Do that set of records participate in relationships that the full set doesn't?

  3. #3
    Join Date
    Apr 2017
    Posts
    1,687
    I suspect this is the case of bad excel table structure applied to Access database!

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,479
    Provide an example with sample data from your 2 tables and what you want it to do/look like. Hard to tell what it is exactly you are asking from your description.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,451
    if I had to guess, I think the OP is trying to pivot the data

    tbl_updated_table:
    ID data1 data2 data3 data4 data5 data6 data7

    if so - a poor design for a table

  6. #6
    Clifford86 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    27
    Thanks everyone for the reply. I got it to work other than one part. In the end, yes, it is a bad design. Just because the concept in one's head works, does not mean it works in reality. I have gone back to the drawing board to figure out another way to try and go about it. In simple terms I wanted to take the tbl_criteria table that I had a form for and then create another table to use the records in the tbl_criteria table as columns for the other table. Then as I updated the tbl_criteria table I wanted the columns in the other table to be updated or the new columns added from the new record that was added in the tbl_criteria table. Using vba, I was able to get the new table to add the columns. I just could not get it to update columns that had the information in the tbl_criteria updated. As it just kept adding the update as a new column instead of updating the old column. LOL Anyway, back to the drawing board.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Why do you want to save data in non-normalized structure?

    Run a CROSSTAB query when needed to output in this structure.
    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.

  8. #8
    Clifford86 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    27
    Quote Originally Posted by June7 View Post
    Why do you want to save data in non-normalized structure?

    Run a CROSSTAB query when needed to output in this structure.
    I do not know much about CROSSTAB query or how to even go about setting it up to achieve this.

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,016
    That is when Google is your friend.

    Plus the wizard does it for you?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Access query builder has a wizard for CROSSTAB. It will help you learn and understand until you won't need it. Also review http://allenbrowne.com/ser-67.html
    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. Replies: 3
    Last Post: 05-14-2020, 04:11 PM
  2. Replies: 4
    Last Post: 11-29-2017, 10:01 AM
  3. Replies: 9
    Last Post: 06-15-2017, 03:00 PM
  4. Replies: 5
    Last Post: 08-25-2015, 08:39 AM
  5. Creating reports for table column from form
    By ryanwales in forum Reports
    Replies: 14
    Last Post: 10-13-2011, 12:48 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