Code works when stepping but not when running

cheer

Registered User.
Local time
Tomorrow, 03: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
 
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?
 
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?
 
...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)>
 
I think in connection string. New access uses ace ole and not jet 4.
 

Users who are viewing this thread

Back
Top Bottom