Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2022
    Posts
    1

    Dynamic Table

    I work as an assayer at a small laboratory. We analyze different elements in mineral samples. For example, on Sample 1 we will determine lead and zinc concentrations, while on Sample 2 we will determine lead and iron concentrations.

    On Access, I have a table that has a field for the sample ID (short text), and a field for de n number of assays on that sample (multiple combo box).

    I was wondering if there is a way to create a table/report from this first table (mentioned above), where the rows contain the sample information and the number of columns will change and depend of the different assays on those samples. Continuing with the example, the table would have two rows, as for Sample 1 and Sample 2, and three columns, for the elements of lead, zinc and iron. If this number of elements would ever change, so would the number of columns.



    I been struggling with this for quite a while now, if someone could help me, I will much appreciate it.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    No, if I understand what you describe, that is not a viable approach. Fields are in table or they are not. If field is removed, data is removed.

    Normalizing would mean a related dependent table where each element test result is a record.

    Exactly what is "field for de n number of assays" and why is it a multi-value?
    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
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    The number of columns should not change.
    you may need a sub table where the Topics and values change. Then you have infinite entries. (Columns)
    like:

    Key topic, value
    22,length, 2.4
    22,Width, 3.4
    22,width, 1.1

  4. #4
    Join Date
    Apr 2017
    Posts
    1,687
    You need something like:
    tblSamples: SampleID, SampleDate, SampleMineral, SampleOrign, SampleComment, ...
    tblAnalyzeResults: AnalyzeResultID, SampleID, AnalyzeDate, ChemistID, AnalyzedComponent, Concentration, ...

    You'll have a single main form where you register/select a sample, with a contionuous subform where all analyze results for active sample from main form are entered/displayed. Both forms are linked through SampleID. And you can get a report of any design you want, using a query based on those tables.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742

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

Similar Threads

  1. Pivot Table dynamic TableDestination
    By Sephaerius in forum Modules
    Replies: 1
    Last Post: 06-20-2019, 10:43 AM
  2. Dynamic field and table names
    By mcucino in forum Programming
    Replies: 6
    Last Post: 01-03-2019, 09:24 PM
  3. Creating a Form for Dynamic Table
    By Ashe in forum Forms
    Replies: 7
    Last Post: 02-25-2014, 12:10 PM
  4. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  5. Dynamic Check Boxes values from table
    By ktmjamal in forum Forms
    Replies: 1
    Last Post: 02-21-2011, 07:49 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