Try the following be opening a recordset on the table.

MyRecordset.open "NextAvailID",connection object,adoopenkeyset,adlockpessimistic,adcmdtable