No Records Deleted Message

M

Micki

I have a macro that runs a delete query that only deletes records if matching
records do not exists in another table. The delete query is working fine,
but I would like a message box to appear if the delete fails due to the
matching records.

My query is [Delete Weld] and the key field is [Weld Number].

I have created a error message form and added the OpenForm command to the
macro with the condition [Delete Weld].[Weld Number] Is Null but the form
opens regardless of whether records are deleted or not.

Any suggestions?
 
K

Klatuu

Before you execute the query, use a DCount function to see if there are any
matching records.
 

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