a2000 - deleting record from form - command button

cft

Registered User.
Local time
Today, 16:53
Joined
Dec 31, 2001
Messages
52
Have read previous posts re: this topic but not getting results from applying them...Command Button "delete record" does not delete record. Changed code as recommended DoCmd select and DoCmd delete. Form Record Selector on left of screen highlights, but a message box pops with "delete action not available now". I have left the code as Access 2K sets it and got no action. Changed code and no action. This function seemed to work properly prior to conversion from Access97. Thanks in advanc for any help on this. Going in circles to figure it out.
 
Have you tried using the wizard to create the button? It uses "docmd.domenuitem ..." but works in A2000.
 
Yes, I have tried it. The code received is:
Private Sub Command384_Click()
On Error GoTo Err_Command384_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Command384_Click:
Exit Sub

Err_Command384_Click:
MsgBox Err.Description

Absolutely nothing happens. Thanks for the reply hope this additional info is helpful.
 
If absolutley nothing happens (not even an error) are you sure the command button has code behind on the On Click event? Simple, I know, but sometimes when troubleshooting and renaming things, the code gets disconnected from the control.

Alternatively, can you post the form and table so I can look at it?
 
Also, make sure that you are on the record that you want to delete. This code will select the current record and then delete it. It should work as given as long as it's in the click event of the delete button and you are on a specific record.
 

Users who are viewing this thread

Back
Top Bottom