Results 1 to 4 of 4
  1. #1
    smc1155 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    2

    Return Start & Stop Times by Date

    I have a table containing log data about file transfers. Each arrival creates a unique record with file name, date, and time. Each delivery creates unique record with file name, date, and time. A sample is below with the IN and OUT pair. The underscore "_" are to keep spacing in the post only and are not in the date.

    Source_File____Dest_File________Event_Date__Event_ Time
    ==============_================_===========_====== =====
    ORGFile1.txt___DLIVFile1.txt____1/1/2016____22:09:03
    DLIVFile1.txt__TGTFile1.txt_____1/1/2016____22:12:45

    ORGFile1.txt___DLIVFile1.txt____1/3/2016____23:41:14
    DLIVFile1.txt__TGTFile1.txt_____1/3/2016____23:43:54

    ORGFile2.txt
    ___DLIVFile2.txt____1/1/2016____22:11:33
    DLIVFile2.txt
    __TGTFile2.txt_____1/1/2016____22:13:02

    ORGFile2.txt
    ___DLIVFile2.txt____1/2/2016____22:08:44
    DLIVFile2.txt
    __TGTFile2.txt_____1/2/2016____22:10:12

    ORGFile2.txt
    ___DLIVFile2.txt____1/3/2016____22:22:01
    DLIVFile2.txt
    __TGTFile2.txt_____1/3/2016____22:25:15




    I need to present the file name with arrived time and delivery time for each given date in an Excel spreadsheet similar to below.

    _____________________1/1/2016____________1/2/2016____________1/3/2016
    DLIVFile1.txt___22:09:03_22:12:45_______________________23:41:14 23:43:54
    DLIVFile2.txt___22:11:33_22:13:02___22:08:44 22:10:12___22:22:01 22:25:15


    I'm looking for a way to produce an output similar to the Excel spreadsheet to export the results or cut/paste the results.

    In short the problem statement is this:
    I need to concatenate related records and report the IN and OUT times by date in way which can be easily imported or cut/pasted into a single linear Excel record.

    Any help is appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    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
    smc1155 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    2
    I think this would work if I were gathering 1 key and concatenating values from a single field. In this case I have 1 key (FileName) and I need to retrieve values from multiple fields...Date, Arrive_Time, Send_Time. This would be an easy problem to solve if it were possible to create a Crosstab Query with 2 values.

    FileName = Rows
    Dates = Columns
    Arrive = Value
    Send = Value

    The resulting table would be perfect.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    Allen's code can be adapted to concatenated values from multiple fields.

    The real complication in your situation is the 'header' row of dates you want to generate.

    As for CROSSTAB, another Allen Browne reference http://allenbrowne.com/ser-67.html#MultipleValues

    Another approach would be VBA writing records to a 'temp' table.
    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. start / stop clock
    By laynlowz in forum Forms
    Replies: 1
    Last Post: 10-19-2015, 06:32 PM
  2. Replies: 8
    Last Post: 09-24-2014, 12:37 PM
  3. Replies: 6
    Last Post: 06-28-2014, 07:45 PM
  4. Start and Stop times where condition true
    By cheshire_smile in forum Queries
    Replies: 3
    Last Post: 07-05-2011, 09:59 PM
  5. auto start/stop time
    By j0ker21m in forum Reports
    Replies: 1
    Last Post: 12-10-2005, 08:42 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