Results 1 to 2 of 2
  1. #1
    suki360 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    3

    on delete event in subform


    I am using an Access 2003 mdb front end with SQL Server 2005 backend and have an invoice form with an invoice line item subform. I've written code on the on delete event of the subform so that when an invoice line item is deleted, then I update the inventory table. It works great if one line item is deleted. But if multiple line items are selected and deleted, then Access hangs. I can't seem to run queries in SQL Server either until I kill Access in task manager. The invoice lines don't get deleted.

    If I remove all code from the on delete event, then the delete proceeds normally for multiple selections. If I add just a couple of lines of code back to the on delete event (taking out the update to the inventory table), Access hangs again.

    Has anyone else experienced this or know what's going on?
    Thank you!
    Kim

  2. #2
    suki360 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2011
    Posts
    3

    More details

    Actually code does work - it's a DAO snapshot recordset that's causing the issue. But I'm still perplexed as to why the code with the recordset will work with single row deletions in the subform, just not multiple row deletions as the code should run for each selected row to be deleted.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-25-2011, 11:32 AM
  2. AfterUpdate event won't refresh subform!
    By Remster in forum Forms
    Replies: 16
    Last Post: 11-26-2010, 10:06 AM
  3. Before Update Event
    By randolphoralph in forum Programming
    Replies: 0
    Last Post: 06-15-2010, 09:26 AM
  4. Trigger subform event
    By tuna in forum Forms
    Replies: 0
    Last Post: 05-09-2010, 06:29 AM
  5. Replies: 21
    Last Post: 06-03-2009, 05:54 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