No Records Deleted Message

  • Thread starter Thread starter Micki
  • Start date Start date
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?
 
Before you execute the query, use a DCount function to see if there are any
matching records.
 
Back
Top