delete error

kingsgambit

Registered User.
Local time
Today, 16:11
Joined
May 27, 2001
Messages
134
I have a list box which lists all my records I want to be able to select a record from the listbox and press a button to delete that record.
I used to wizard to create a delete code, but I don't where in the code to tell it to look at the list to see what record needs deleting.
I also want it to after deleting the record requery the listbox, so the deleted record is not shown but it says in field find.
 
From one Gambit to another...

Add this to the command button:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

'Requery Listbox

Me.nameofListbox.Requery
 
Oops...sorry Pat, copied it from an older db that I had on my machine...one that was converted from 97 to 2000...he he...

Tells you how much I need to clean-up my files....

By the way...where's the book? I believe a Chapter on updating Code would be appropriate.


:D
 
I have tried that code but I want to be able to select a record from a listbox then click delete, how do I put in the code the record I have selected from the listbox
 

Users who are viewing this thread

Back
Top Bottom