Break / Pause VBA command (1 Viewer)

cheer

Registered User.
Local time
Today, 07:06
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
 

JHB

Have been here a while
Local time
Today, 01:06
Joined
Jun 17, 2012
Messages
7,732
..
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.
 

missinglinq

AWF VIP
Local time
Yesterday, 19:06
Joined
Jun 20, 2003
Messages
6,423
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

Top Bottom