Error executing delete query

G

Guest

Hi,

I created a simple delete query which runs fine.

DELETE *
FROM Employees
WHERE Last_Name Like Forms!List_Employees!Last_Name;

I know it's not idea. I'm going to go back and use the employee_ID once I've
ironed out the bugs.

The problem is when I try to have the query execute as the result of a
button click. The Wizard wouldn't let me chose that query to execute and when
I selected a differerent query and changed the name in the "on click" sub I
got this error: A Problem occured while Master_Inventory was communicating
with the OLE Server or Active X Control.

Help please!
 
S

Squirrel

Hi,
Try changing the SQL to this:

" DELETE * FROM Employees WHERE Last_Name " & _
"Like '" & Forms!List_Employees!Last_Name & "';"

If you're not using wildcards you may as well use the "=" operator, there's
no value in the "Like".

HTH -Linda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top