Look Up COmbo - Last Record

M

malycom

Hi

Can someone help with how I can populate a look up combo to only show the
last record in the table.

I know I will have to assign a query to the row source but I don't know how
to write the actual query.

The table I will be showing will be clients and the the filed I want to show
is client_key - I only want the last record to be able to be on view here as
I can't afford for any accidental deletions of older records but I have to
add info for the new record.

Thanks in advance
 
M

Matt

Hi

Can someone help with how I can populate a look up combo to only show the
last record in the table.

I know I will have to assign a query to the row source but I don't know how
to write the actual query.

The table I will be showing will be clients and the the filed I want to show
is client_key - I only want the last record to be able to be on view here as
I can't afford for any accidental deletions of older records but I have to
add info for the new record.

Thanks in advance



The easiest way to do it would be to write a query like the following:

SELECT TOP 1 someField
FROM someTable
ORDER BY dateField DESC;
 
Top