Hello All,
I am having an issue with this code:
strSQL = "DELETE * FROM [tbl_Department] WHERE " & _
"[Department] = """ & Me.lst_Dept & """;"
DoCmd.RunSQL strSQL
Me.Department = ""
Me.lst_Dept.Requery
I am trying to let the user delete a department from a listbox. They click on the department to delete then click DELETE and the magic should happen. Well it looks like it is happening, however, when I open the form again there is a blank entry in the list and of course in the table.
1st why is that happening and second how do I fix it from happening?
I am having an issue with this code:
strSQL = "DELETE * FROM [tbl_Department] WHERE " & _
"[Department] = """ & Me.lst_Dept & """;"
DoCmd.RunSQL strSQL
Me.Department = ""
Me.lst_Dept.Requery
I am trying to let the user delete a department from a listbox. They click on the department to delete then click DELETE and the magic should happen. Well it looks like it is happening, however, when I open the form again there is a blank entry in the list and of course in the table.
1st why is that happening and second how do I fix it from happening?