MS Access crashes after I run a code with 3 DoCmd.RunSavedImportExport "Import-xxxxxx"
It works fine if I run the code with only 1 or 2 DoCmd.RunSavedImportExport "Import-XXXXX"
Works on Windows 10 with MS Office 2016.
MS Access crashes after I run a code with 3 DoCmd.RunSavedImportExport "Import-xxxxxx"
It works fine if I run the code with only 1 or 2 DoCmd.RunSavedImportExport "Import-XXXXX"
Works on Windows 10 with MS Office 2016.
This is a total shot in the dark, but try adding:
DoEvents
between the imports.
OK for a test but not a permanent solution? I say that because a) it's not the system that will be busy doing something because we've invoked an outside process, but it's Access doing the transfer. Plus, I've read that it's a real cpu cycle hog. I prefer to use the pc clock to wait a few secs between repeating some process or call, like
Pause(3)
Code:Public Function Pause(intSecs As Integer) Dim Start As Variant Start = Timer Do While Timer < Start + intSecs Loop End Function
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
When I execute the 3 DoCmd.RunSavedImportExport one by one, three different procedures on button-clicks, MS Access crashes also.
So I don't think its a matter of time.
No solution with DoEvents between imports.
Try the same imports manually from the ribbon to see if there's am error raised. After reviewing first post, seems possible one of them is at fault but you don't say if you mixed the combinations two at a time. Is there an error handler in the code but it isn't getting there thus isn'tgiving a clue to the problem?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
He Micron,
All commands works fine as long as I limits to 2 and then close the mdb.
After restarting mdb I can execute the third command without problem.
I use an errorhandler but access crashes "access stop working"
Last edited by jedeha; 08-21-2017 at 11:07 AM.
Been away; sorry for the delay & I see no other responses. Unfortunately, if you're saying it works with any combination as long as you don't go over 2, then I have no idea why nor what the fix would be. The last suggestion I could make would be to import everything into a new db after decompiling the current one and see if the new db suffers from the same bug.
Good luck!
Micron, thx for the response,
after copying the mdb to a new one I detected that I have still the same problem.
Then I imported the data manually. In the new mdb I had to create "SavedImport actions" and when I imported the third data from the .db3 file access crashed.
I import the data from three db3 files. This is the code for one of the files: ODBC;DSN=DB3-DebtorCards;Database=C:\BP\17-08-14\System\DebtorCards.db3;StepAPI=0;SyncPragma=NOR MAL;NoTXN=0;Timeout=;ShortNames=0;LongNames=0;NoCr eat=0;NoWCHAR=0;FKSupport=0;JournalMode=;OEMCP=0;L oadExt=;BigInt=0;JDConv=0;
You have said in your own words that if you import A then B or A then C or B then C, everything works. I know of no reason why Access would not crash when running 1 out of 3 or 2 out of 3 imports but crash when running 3 out of 3. I'm afraid I'm out of ideas.
Micron, thanks anyway,