Code works when stepping but not when running (1 Viewer)

cheer

Registered User.
Local time
Today, 17:03
Joined
Oct 30, 2009
Messages
222
It work perfectly when in MDB when execute from main screen till the screen you are looking for.

However, after migrating to Access 2017 (64 bits) and Windows 2012 Server (64 bits), a lot of problem errors seem like appear. Anyone know why it behave abnormally at the highlighted code in red colour ?

Set cnn = New adodb.Connection
cnnNew.ConnectionString = const_MDB
cnnNew.CommandTimeout = const_ConnectionTimeOut
cnnNew.CursorLocation = adUseClient
If cnnNew.State = adStateClosed Then cnnNew.Open
 

cheer

Registered User.
Local time
Today, 17:03
Joined
Oct 30, 2009
Messages
222
I have imported all forms into accdb environment.

Only 10% of forms can't work. However, those forms work perfectly if through debugging. I don't understand why it behave like this?
 

Minty

AWF VIP
Local time
Today, 10:03
Joined
Jul 26, 2013
Messages
10,368
The "correctness" factor in VBA code has been tightened up over version updates, so it's possible that something that was working in <=2003 versions may not now be completely correct as far as 2017 VBA is concerned.

If you compile the VBA does it highlight any errors?
 

missinglinq

AWF VIP
Local time
Today, 05:03
Joined
Jun 20, 2003
Messages
6,423
...those forms work perfectly if through debugging. I don't understand why it behave like this...

As a rule, when something works when stepping through the code, but doesn't work when being executed normally, there is a timing problem in the code. What, exactly, is being done in the Forms that are the problem?

Linq ;0)>
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:03
Joined
May 7, 2009
Messages
19,232
I think in connection string. New access uses ace ole and not jet 4.
 

Users who are viewing this thread

Top Bottom