Hi,
I am unable to delete a selected record on listbox using command button.
I am new to Access and have made VB code using internet help.
Here is my code.
When I click on Command button I get run-time error 3086, Could not delete from specified tables.
Thanks in advance for your help.
Anand
I am unable to delete a selected record on listbox using command button.
I am new to Access and have made VB code using internet help.
Here is my code.
Code:
Private Sub Delete_Selected_Click()
Dim SQL11 As String
DoCmd.SetWarnings False
SQL11 = " Delete *" & _
" from dbo_Employee_Project" & _
" where [dbo_Employee_Project].[Project_ID] ='" & Me.List114.Column(0) & "' AND [dbo_Employee_Project].[Employee_Id] ='" & Me.Text50 & "'"
MsgBox SQL11
DoCmd.RunSQL SQL11
Me.List114.Requery
Me.Requery
DoCmd.SetWarnings True
Exit Sub
End Sub
Thanks in advance for your help.
Anand
Comment