Hi,
here is the thing. I have this Access program that I am working on that is suppose to delete the selected item in the list box when every I click the delete button. When the delete button is clicked the item in the list box on top would be deleted and not the one that is already selected. Is there anyone who can show me what I did or rewrite the code for me? This is the code that I was working with:
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.RunCommand acCmdDeleteRecord
Me.List0.Requery
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
I also took the liberty of uploading the whole utility program so that you can take a closer look at it.
~~~~~~~~~~~~~~~~~
James
here is the thing. I have this Access program that I am working on that is suppose to delete the selected item in the list box when every I click the delete button. When the delete button is clicked the item in the list box on top would be deleted and not the one that is already selected. Is there anyone who can show me what I did or rewrite the code for me? This is the code that I was working with:
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.RunCommand acCmdDeleteRecord
Me.List0.Requery
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
I also took the liberty of uploading the whole utility program so that you can take a closer look at it.

~~~~~~~~~~~~~~~~~
James