ListBox Requery

wrweaver

Registered User.
Local time
Today, 14:04
Joined
Feb 26, 2013
Messages
75
I have a listbox with a doubleclick event that opens up a record. Then only way to delete that record is by opening it up from that listbox and then using the record delete function on the form. I don't want to create delete buttons so that if they decide to delete a record the deletion is more deliberate. Anyways, I want the listbox to automatically update after the record is deleted and I can't figure out where to place the
listbox.requery function. Any ideas?
 
What about the last line of the Delete button Click event?
 
How are you opening the record? It should be a form that you are opening and then you can have code in the On Delete Confirm event or in the On Close event of the form (me, I'd do the on close of the form). And the code would be

Forms!YourFormNameHereWhereTheListBoxResides.ListboxNameHere.Requery

(replacing the applicable names with your actual names.)
 

Users who are viewing this thread

Back
Top Bottom