"towdit" <(E-Mail Removed)> wrote in message
news:A78874F2-11C4-453B-9992-(E-Mail Removed)
>
> Thanks for your prompt reply. I agree that it seems to be a timing
> issue as the error does not always occur. The database resides on a
> network server and I am accessing it from my workstation over the
> LAN. If I step through the code with the debugger I don't get the
> error, further confirming a timing issue. Is there a way I can commit
> the change prior to looking up the primary key of the new entry?
You might try inserting the line
DBEngine.Idle dbRefreshCache
after executing the query and before your DLookup.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)