Results 1 to 3 of 3
  1. #1
    technesurge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    14

    How do I put many simple records into columns???

    Hello all,

    My datalogger takes a snapshot and it creates a table like this:

    DataAndTime, DataName, DataValue
    -----------------------------------------
    6/19/2012 9:00:00AM, DataName1, X
    6/19/2012 9:00:00AM, DataName2, Y


    .
    .
    .
    6/19/2012 9:00:00AM, DataName68, Z

    Unfortunately I have no control over how the datalogger writes. I want to reorganize the data so that I can have each snapshot as 1 record:

    DateAndTime, DataName1, DataName2...DataName68
    -------------------------------------------------------------
    6/19/2012 9:00:00AM, X, Y... Z

    Initially I had success.
    I used the following code to select each datapoint:

    SELECT Table.DateAndTime, Table.DataValue AS DataName1
    FROM Table
    WHERE (((Table.DataName)="DataName1");

    I created a query like the one above for each DataName. Then I made a "master" query by relating all the sub queries by DataAndTime, and stacked them together in one wide master query. Everything was fine except somewhere around 30 of these Access complains the query is too complex.

    There must be another way to do this. Is there a way to run a VB script anytime a table changes?

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi:

    "I want to reorganize the data so that I can have each snapshot as 1 record:"

    My suggestion - don't do it that way, it is very poor database design (unnormalized), which can lead to problems as you have seen.

    Keep each record as it is, with the three fields. You can use a cross-tab query to display the data the way you need it.

    John

  3. #3
    technesurge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    14
    Thank you very much!

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

Similar Threads

  1. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  2. Replies: 1
    Last Post: 05-14-2012, 04:12 AM
  3. Replies: 0
    Last Post: 10-21-2010, 08:24 AM
  4. Simple Export Not So Simple
    By jgelpi16 in forum Programming
    Replies: 11
    Last Post: 09-01-2010, 07:23 AM
  5. Lookup Columns Multiple Records in report
    By schultzy in forum Reports
    Replies: 1
    Last Post: 01-02-2010, 12:21 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