TOP value function

M

Manton

Hi. I have Access 2000.
I have this query that lists record for a given date period (chosen by user
through dialogue boxes - eg. [date from] and [date to] )
When it gives a list of records for the given date period, I would like it
to pick out the first 170 records based on the earliest date (field called
"enquiry date").
I have simply use the properties box for the query and entered the number
170 in the 'Top Values' property field. Its the sorting out of these 170
where i have a problem. It doesn't give me the earliest dates in a given
month for the 170 records. It does not sort in the 'enquiry date'. I have
tried the Order By property field in the query property box by simply
typing [enquiry date]. But no success.
help.
 
H

help

you can wirte the JET SQL CODE in the query .

select top 170 * from tablename where datefield between [date from] and
[date to]
 

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