You should be able to just select and order by date, time - it will give your results in row order. If you must have it split out like you want, take a look at the pivot table wizard.
Or... make separate lists for say 5 days and allow the user to pick the start date - then you could page through it. Or make a calendar like look and fill each day with the data for the day.
BTW, the use of DATE, TIME, and CODE for field names is a bad idea.
-w-
>Hi
>I have the following situtation:
>I have a table called meetings (MEETINGS) holding customer code (CODE), date (DATE) and time (TIME) of meeting.
>A user is asked to enter a date range ( FromDate - ToDate ), generally a week. The purpose of the form is to show in a grid the different dates in the column headers and the hours in the first column. The data in the grid will be the customers.
>The meetings are generally in the 15 or 30 minutes slots. Sometimes,
there can be many meetings at the same time.
>What i did is create a temp. cursor to hold the dates, then run the query with this cursor as 'left' table and the MEETINGS table in the right, and i get the desired data. The problem is how to create the time column in the grid, without having to run every single time slot through all the week to see how many meetings for every day. To be more specific, let's assume the following data in the meetings table:
>
>CODE DATE TIME
>CUST1 15/01/2004 10:00
>CUST2 15/01/2004 11:00
>CUST3 15/01/2004 11:00
>CUST4 15/01/2004 12:00
>CUST5 15/01/2004 13:00
>CUST6 16/01/2004 10:00
>CUST7 16/01/2004 11:00
>CUST8 16/01/2004 12:30
>
>I would like, in the grid, to obtain something like:
>
>TIME 15/01/2004 16/01/2004
>---- ---------- ----------
>10:00 CUST1 CUST6
>11:00 CUST2 CUST7
>11:00 CUST3 -
>12:00 CUST4 -
>12:30 - CUST8
>13:00 CUST5 -
>
>Is this achievable, or will i have to suffer?
>
>Jaime
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown