Page 6 of 6 FirstFirst 123456
Results 76 to 82 of 82
  1. #76
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by Minty View Post
    I used to have a old active x treeview control used in a few forms, and it "randomly/regularly" used to just stop working, which would crash the DB as soon as that form was opened.
    I eventually had a backup copy of the control on a spare form stored in the database, I simply deleted the duff one copy and pasted the backup back onto the form and it would remain fixed.

    Sometimes it was fixed for 2-3 days, more often than not it would last 2-3 months.

    I tried everything to prevent it from going sideways, and in the end swapped it out for a purely VBA treeview, which solved the issue, but it was mega frustrating.
    I have a treeview control in this app, from these guys https://jkp-ads.com/Articles/treeview.asp
    Works very nicely. I've done a LOT of modifications to it, but it does a great job. One of the developers responded promptly when I had some questions, and had numerous helpful suggestions. Gets five stars from me. Naturally, that was one of the first things I tried removing when this problem cropped up, but that wasn't it.

    I finally tracked it down to a group of five unbound text fields, one of which had an expression to fill it. When I hacked away everything else from the form except them, it still bombed. When I removed one or more, or removed the expression from the computed field, the crashing reduced, but did not abate entirely until I removed the lot. Went back to the unmodified app and removed those same fields. First try bombed again, but then I remembered to do another C&R after removing them, and since then it has been starting properly.

    No idea what was going on with those fields. When they were the only thing on the form, I tried separating them more, changing sizes - nothing helped. They were somehow jinxed. I'm going to continue fiddling with this for a bit, and if it continues to work, I'll reinstate those fields somehow. Users need the information they showed. But now I'm going home, while I'm still on a high note.



    More to follow.

  2. #77
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by Cottonshirt View Post
    that was a fascinating story. a lone hero battling multiple villains he can't see who strike at random with invisible weapons then disappear before our hero can respond. using a secretive communication method he enlists the help of multiple compadres who are handicapped by not being able to see what is going on, but offer aid and succour and send emergency supplies. our hero has one arm tied behind his back, then his eyes are covered in a film of glue, and his one remaining hand has two fingers stuck together but he refuses to surrender and fights valiantly on. the server is suspected of being in league with the evil one and is tortured but confesses nothing. forms are strip-searched, tables are banished to distant lands, magical code is written by secret elves to bring dead references back to life but nothing seems to work until suddenly, just as the fortress is about to be breached, a lone knight appears and banishes the evil warlord's buttons.

    I can't wait until the film comes out?
    Hm, good thought, but can any actor portray me heroically enough?

  3. #78
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Quote Originally Posted by pdanes View Post
    Hm, good thought, but can any actor portray me heroically enough?
    ? ?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #79
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by Minty View Post
    ? ?

  5. #80
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Looking good. I undid all the rubbish I put in trying to track down the problem, went back to my original start-up form and recreated the problem text fields, using a slightly different graphic layout and new text field names, just to be on the safe side, in case there is still some dross lurking in the bowels. So far great - been working with it all day and not one hiccup. I'm still going to create a script that will hammer it thoroughly, once I get all properly in place, but at this point I'm pretty optimistic.

  6. #81
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Quote Originally Posted by pdanes View Post
    Looking good.
    Excellent news.
    Obviously an "object" lesson in don't underestimate how something can get screwed up without obviously being broken.

    Top marks for persistence.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #82
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Ok, here is the wrap-up. After wiping and recreating the problem fields, I made a small HTA script that opens the database, waits a few seconds and closes it again. If the close attempt does not find the database, (presumably because it quit on its own, like it used to), the script announces an error and halts. I let it run for a couple of hours and got well over 400 successful starts out of it, and not one single crash.

    At this point, I'm going to consider the problem solved. No idea what was wrong with those fields, and why they worked for so many years without problems, then suddenly started misbehaving in more modern machines, or why the problems persisted through multiple decompiles, C&Rs, and ports to new databases, but the details of exactly what went wrong are academic at this point. The database works, Microsoft has another black mark in my book for shitty quality control and life goes on.

    Thank you everyone who contributed suggestions, and here is the HTA – maybe it will be useful to someone else who needs to exercise a start-up process.

    Code:
    <!DOCTYPE html><html lang="en">
        <head>
            <title>Database hammer</title>
     
        <HTA:APPLICATION
            APPLICATIONNAME = "Database hammer"
            BORDER = "thick"
            CAPTION = "yes"
            SHOWINTASKBAR = "yes"
            SINGLEINSTANCE = "no"
            SYSMENU = "yes"
            WINDOWSTATE="normal"
            SCROLL = "no"
            SCROLLFLAT = "no"
            VERSION = "1.0"
            INNERBORDER = "yes"
            SELECTION = "yes"
            MAXIMIZEBUTTON = "no"
            MINIMIZEBUTTON = "no"
            NAVIGABLE = "yes"
            CONTEXTMENU = "yes"
            BORDERSTYLE = "normal"
        />
        </head>
    
    
        <script language="VBScript">
    
    
        Option Explicit
    
    
        window.resizeTo 400,300
    
    
        Sub StartHammer
        dim i, t, k
        t = now()
        do
            Process.value = "Started DB"
            k = false
            fred k
            if k = false then 
                Process.value = "No Access"
                exit sub
            end if
            Process.value = "Killed DB"
            TimeElapsed.value = FormatDateTime(now()-t,3)
            i = i + 1
            Counter.value = cstr(i)
            sleep 2
        loop
        End Sub
        
        sub fred(k)
        dim sh, objWMIService, colProcessList, objProcess, i, j
        Set sh = CreateObject("WScript.Shell") 
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
        sh.run "D:\Paleontologie\ProductionNovy\Paleontologie.accdb"
        sleep 15
        Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process Where Name like '%access%'")
        Process.value = "Starting kill " ' & cstr(j.value)
        For Each objProcess in colProcessList
            objProcess.Terminate()
            k = true
        Next
        end sub
        
        Sub sleep (Timesec)
        dim sh
        Set sh = CreateObject("WScript.Shell") 
        sh.Run "Timeout /T " & Timesec & " /nobreak" ,0 ,true
        Set sh = Nothing
        End Sub
    
    
        </script>
    
    
        <body style="background-color:mediumspringgreen;">
            <h1>Database repeated start</h1>
                <p>
                    <button onclick="StartHammer">Start hammer</button>
                </p>
                <p>
                    <label for="TimeElapsed">Process:</label>
                    <input type="text" value="Waiting to run" size="15" name="Process">
                </p>
                <p>
                    <label for="TimeElapsed">Run time:</label>
                    <input type="text" value="Time 0" size="20" id="TimeElapsed" name="TimeElapsed">
                <p/>
                <p>
                    <label for="Counter">Count of starts:</label>
                    <input type="text" value="No starts yet" size="15" id="Counter" name="Counter">
                </p>
        </body>
    </html>

Page 6 of 6 FirstFirst 123456
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access Runtime Crash
    By martinmcnally in forum Access
    Replies: 12
    Last Post: 01-24-2023, 10:02 AM
  2. Access crash
    By JennyL in forum Access
    Replies: 6
    Last Post: 01-19-2017, 03:42 AM
  3. debugging access 2013 crash
    By DKP in forum Programming
    Replies: 6
    Last Post: 10-06-2014, 10:23 AM
  4. Access crash
    By Tjaaaa in forum Access
    Replies: 10
    Last Post: 03-07-2014, 05:41 PM
  5. Diagnose Access Crash
    By Gray in forum Forms
    Replies: 0
    Last Post: 05-28-2011, 01:50 AM

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