Results 1 to 4 of 4
  1. #1
    LarryJ is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    18

    Delete all rows from table on form load

    I have 2 controls with a row source of a table. I have the form load event set to a procedure that deletes * from both tables. The issue is, when I insert rows into those tables, the controls don't show the inserted rows. Should I be emptying the tables at a different time (i.e., not on form load) or empty them a different way?

  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,652
    That's a little confusing, but you may need to empty them in the open event rather than the load event. Or requery the form after emptying the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    LarryJ is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2023
    Posts
    18
    I moved the deletes to the open event and added a requery for both controls there and in the function that loads data to them. Everything is now working as intended. Thank you.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 12-13-2016, 09:48 AM
  2. HOW TO? Sum multiple specific rows and load into report?
    By necessityofFate in forum Reports
    Replies: 5
    Last Post: 10-07-2016, 08:34 AM
  3. Replies: 1
    Last Post: 06-21-2013, 10:41 AM
  4. Replies: 2
    Last Post: 08-22-2011, 09:02 PM
  5. Replies: 0
    Last Post: 08-25-2008, 12:17 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