action query error with odbc

samcoinc

Registered User.
Local time
Today, 18:07
Joined
Sep 26, 2001
Messages
49
I have about 20 querys that run every 5 minutes that pulls/updates info out of our navision accounting software. We just converted to navision the begining of the year so this is relitivly new to me. We used to use SBT(vfoxpro) which allowed us to use an odbc link on every computer to get the data we needed. With navision evey odbc link uses up a licsence. So - I have on the server a access database that is linked to navision with odbc using one licsence and updating the the data that we need. All the other computers that need the accounting data are then linked to that access database.

Anyway - this works wonderfully. works alot better then the foxpro solution. The problem is this - The action querys run great for days - even weeks then I will get an error most of the time to the effect of "record deleted" do you want to continue the query. (I don't know the exact words as I am at home.) It seems to happen most when the accountants are posting invoices. What I want to do is skip over the query if an error occures. Like a "on error resume next" - But that doesn't work. The querys are running by a forms ON TIMER event.

What are my options.

Thanks
sam
 
You can do this and still do it in the forms 'ontimer' event.

In the event put a piece of code that runs the SQL from VBA. within that sub you can then run error checking and events.

This should solve your problem.

There is lots in this forum about running queries from VBA.

HTH
 

Users who are viewing this thread

Back
Top Bottom