Results 1 to 11 of 11
  1. #1
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6

    Cool MS Access crashed after DoCmd.RunSavedImportExport commands


    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.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    This is a total shot in the dark, but try adding:

    DoEvents

    between the imports.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    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.

  4. #4
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6
    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.

  5. #5
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6
    No solution with DoEvents between imports.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    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.

  7. #7
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6
    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.

  8. #8
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    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!

  9. #9
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6
    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;

  10. #10
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    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.

  11. #11
    jedeha is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Posts
    6
    Micron, thanks anyway,

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-27-2016, 09:10 PM
  2. Replies: 7
    Last Post: 02-26-2013, 02:26 PM
  3. Replies: 3
    Last Post: 04-24-2012, 08:32 AM
  4. DoCmd.RunSavedImportExport file name
    By svcghost in forum Import/Export Data
    Replies: 6
    Last Post: 02-08-2011, 08:05 AM
  5. [Error]Access Crashed Issues
    By ckhaos in forum Security
    Replies: 1
    Last Post: 06-23-2009, 02:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums