View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
gocush[_29_] gocush[_29_] is offline
external usenet poster
 
Posts: 252
Default ADO method for getting highest ID #

sorry I got it:

Dim rs As New ADODB.Recordset

"Rob van Gelder" wrote:

The SQL is:
select max(id) from my_table;

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"gocush" /delete wrote in message
...
I'm using ADO to query an ms Access db. How do I get the highest number
in
the first field: ID which is the primary key, and return it to Excel?