hey guys!
i was wondering if you could help me with the following problem.
i have a form in which i have added a LIST BOX. this list box lists all the users i have in the tblEmployees table.
i then have a COMMAND BUTTON to which i have given the command DELETE RECORD using the wizard that pops up. However, when i select a record in the LIST BOX and click the button, it doesnt work!!!
nothing happens? i think i need a code to link the button with the list box or something like this maybe.
i have the following code assigned to the button:
Private Sub btnDeleteUser_Click()
On Error GoTo Err_btnDeleteUser_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_btnDeleteUser_Click:
Exit Sub
Err_btnDeleteUser_Click:
MsgBox Err.Description
Resume Exit_btnDeleteUser_Click
End Sub
thanx people,
Satty
i was wondering if you could help me with the following problem.
i have a form in which i have added a LIST BOX. this list box lists all the users i have in the tblEmployees table.
i then have a COMMAND BUTTON to which i have given the command DELETE RECORD using the wizard that pops up. However, when i select a record in the LIST BOX and click the button, it doesnt work!!!
nothing happens? i think i need a code to link the button with the list box or something like this maybe.
i have the following code assigned to the button:
Private Sub btnDeleteUser_Click()
On Error GoTo Err_btnDeleteUser_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_btnDeleteUser_Click:
Exit Sub
Err_btnDeleteUser_Click:
MsgBox Err.Description
Resume Exit_btnDeleteUser_Click
End Sub
thanx people,
Satty