I would be greatful for help on the following problem in Access 2000- if I update a table ( in this case an invoice table) and then immediately requery the table ( to get an up to date balance for customer)- I am not getting a consistent result. If I deliberately stop the code ( by putting in a msgbox), the balance is correct- and this appears to be time dependent
- it would appear that it takes access a second or so to update the underlying tables. I am not sure if this is a machine specific problem or me simply being ignorant.
- if I attach the requery code to the transaction complete event of the connection, it makes no difference.
Am I missing something simple here? I shall sleep again when I solve this!
This was in ADO. As often happens, as soon as I posted the message, I discovered the problem. Unwittingly I was using Set Connection as New Connection, and then connection= currentproject.connection- and in fact was creating a new connection for both the invoice update, and the balance update- I found in the knowledge base that different connections cannot see updates for a default period of 5 seconds- thus the problem. Rather than create a new connection, I reset the code so that set connection= currentproject.connection- and its fine
Thank you for your interest. I guess this was ignorance, but there may be others out there who have been caught by this.