List earliest appointment time for several dates

G

Guest

I have a table with dates that have multiple appointment times. I need to
know how to buid a query that can select the first appointment time for each
date in a selected date range. I am working in Access 2003.
 
M

[MVP] S.Clark

Select IDField, Max(DateField) from Tablename GROUP BY IDField Where
DateField Between x And y.
 
G

Guest

I guess I am somewhat confused. I have a date field, a "time-in" field and a
"time-out" field. Each day in my date range has multiple appointments and I
need to filter the query somehow so that I only show one row for each day,
and that row has the first appointment time. I am not sure what I am missing
in this, but I would appreciate it very much if you could elaborate a little.
Thanks!
 
M

[MVP] S.Clark

To show only 'One row per [anything]', you use the GROUP BY operator.

Select f1, function(f2) From table GROUP BY f1

Adding the totals row to the grid implements this functionality. View /
Totals from the main menu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top