Results 1 to 13 of 13
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Access blows up

    Give Access' Blue Screen of Death, is there anything that can be glean'd from the situation depicted below?
    Click image for larger version. 

Name:	000.jpg 
Views:	19 
Size:	49.9 KB 
ID:	27056

    I did make changes to the opening form's code sheet but ran it several times before the severe error occurred. Also, I transported the mdb file to a A2003 system and the mdb runs without any errors. The mdb source is formatted for 2000-2003.



    I created a new db and imported all the components from the failing db in the belief that perhaps the offending mdb was corrupted, but the newly created mdb fails also.

    Any ideas?

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Go into code from a form design, do Debug/Comple, then save it all, go to the Office button(top left) and do Manage/Compact and Repair, exit it all. See if that clears it.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Yes, I tried to see if compact and repair would clean things up but no success.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Can you post a copy of your db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I'd like to but don't at the present time have a non-proprietary back-end to post.

    I'm going to go back one version of the app and incrementally add the changes made this morning carefully bench-marking each segment of the change and see if I can flush out what might have caused the issue. That will take awhile and I'll post back after I've done that. (It's currently 1PM in California)

  6. #6
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Did you do this first part? Go into code from a form design, do Debug/Compile, then save it all. Sometimes compiling the code fixes whatever bugs are causing issues.

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I'd like to but don't at the present time have a non-proprietary back-end to post.

    I'm going to go back one version of the app and incrementally add the changes made this morning carefully bench-marking each segment of the change and see if I can flush out what might have caused the issue. That will take awhile and I'll post back after I've done that. (It's currently 1PM in California)

  8. #8
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Recompile the code after every change you add. Even if there are no syntax issues, sometimes just importing/adding objects or code causes issues.

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    As innocuous as these 4 statements might seem, if they're inserted into the OnOpen procedure the app "blows up". As soon as I moved them to the OnLoad procedure everything worked as expected.
    Code:
    SortColumn = "lblTDate"       'This will change per user selects
    Highlight (SortColumn)        'Highlight column label as currently sorted
    SortField = "tbTDate"         'Need the control name for the Company
    Me.OrderBy = "TDate"
    Before I ever posted this issue, I ran the app in debug mode in attempting to find the point of failure by stepping through the code. I still don't know what caused Access problems, but perhaps it had something to do with text boxes in the footing whose ControlSource properties involved aggregate functions.

    Thanks for all the thoughts,
    Bill

  10. #10
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I'm surprised the effect was that drastic, but I think you can benefit from some insight here. NEVER try to set the value (notice I did NOT say 'property') of anything in the Open event. Until the form is loaded, Access knows nothing about whatever records its controls might be bound to. To attempt to set a value to a bound control should at least generate an error, but you seemed unlucky enough to cause a worse effect. Suggest you review this -
    https://support.office.com/en-us/art...86553682F9#bm3
    You might even be surprised at some of the event orders (I was for subforms).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Must have been the OrderBy assignment statement that sent Access over the edge. The "Highlight" function only changes the "font size" and "fore colors" of the label control passed to it.

    Funny that the mdb didn't blow up when run in a A2003 environment but did in my A2013.

    Your points are well taken and have certainly heightened my awareness as to where I should insert initialization code. I often have times where I don't code OnLoad events so I'm surprised I haven't hit this snag in the past? Reports are really fussy so more often than not such code goes in the OnActivate event.

    Thanks,
    Bill

  12. #12
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Using the info at the link provided, we can see that 'such code' in the Activate is well after the Open (and even after the Load) event, thus should not present a problem. Affecting the records after the Open event is key, since there are no records to affect at that stage, and the result of such an attempt is usually an error of some sort - announced or not.

  13. #13
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Thanks again for your thoughts. You can be sure I'll give a lot more thought when tinkering with any data elements until the form is loaded. And yes, I think it's safe to assume that when a form activates that Access knows everything it needs to know about it's associated data.
    Bill

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

Similar Threads

  1. Replies: 16
    Last Post: 02-14-2014, 09:02 PM

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