Break / Pause VBA command

cheer

Registered User.
Local time
Tomorrow, 04:00
Joined
Oct 30, 2009
Messages
222
If I Step Into (F8) codes, application won't produce any error in DB connection, but if I execute / run the entire application, it will produce error "ODBC--connection to 'erpServer' failed"

The only different I can think off is there is a break / pause during Step In activity regardless how long time you have stopped. Meanwhile, codes will continue to execute in real environment and resulting the above error.

If my analyst is true, can anyone suggest how to overcome this problem by having a "Break / Pause" in real execution via VBA command ?

fyi, I am using the MS Access 2016, 64 bits. Presently I am using connection string

Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=XXXXX

Alternatively is suggestion to correct my connection string
 
..
If my analyst is true, can anyone suggest how to overcome this problem by having a "Break / Pause" in real execution via VBA command ?
..
You could try to add the command DoEvents in one or more places in your code.
 
When stepping thru code doesn't cause the error that appears when actually running the code, the problem is usually a timing problem, of one sort or another...and JHB's suggested may resolve the problem.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom