Results 1 to 3 of 3
  1. #1
    skimis is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2019
    Posts
    1

    Question Access Crashes C05 on button click after setting a listbox.listindex


    I have an Access application that has been working fine. On one form I have a multi-select (simple) listbox. This listbox has two columns: the first is the primary item, and the 2nd is a number so I can show the user the order in which he selected items. To accomplish this, I use the AfterUpdate event to put the selected item into a Collection (or remove it from the collection); and then run a function to update the listbox adding numbers to the 2nd column. To do this I have to remove the item and then add it back into the listbox. So, I also have to update the Selected property for each row in the listbox. If the user selects an item that required him to scroll down (below the visible items), the processing I do moves the listbox back to the top. All this works fine.
    So I decided added a few lines of code to force the listbox to scroll the selected item to the middle of the listbox by setting the ListIndex. After doing this, Access crashes as soon as the user presses any button on the form. It is before the button's associated event code is executed (I can't trap it). The crashes appear in the Windows Error Logs: Access abends with a x00..000C05 abend. I tried decompiling, cleaning up and recompiling - no changes. I comment out the ListIndex code and it works fine. Any ideas????

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    It would probably help to see the code and even better if you post a stripped down version of the db with enough info to see the problem.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    I get this occasionally, a normal button click that used to work ,now crashes the system.
    Try repair/compact a few times. SOMETIMES that corrects it.
    Other times I've had to create a blank DB, then import EVERYTHING from the damaged db to get it to stop crashing.

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

Similar Threads

  1. Replies: 9
    Last Post: 03-12-2019, 08:25 AM
  2. Replies: 24
    Last Post: 02-20-2013, 09:46 PM
  3. Replies: 1
    Last Post: 11-18-2012, 10:41 PM
  4. Combo Box Query Lookup ListIndex Woes
    By Jon-G in forum Access
    Replies: 7
    Last Post: 08-05-2011, 02:57 PM
  5. Export Excel data to access on a button click
    By Grooz13 in forum Import/Export Data
    Replies: 0
    Last Post: 03-15-2011, 10:02 AM

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