Delete an amended record if incorrect

Tiny bird

New member
Local time
Today, 20:16
Joined
Dec 13, 2001
Messages
9
Hi there wonder if you can help.

I have a limited amount of experience with VBA but, don't worry I'm going on a course so I won't be bugging you all for eternity!!

I have a subform where the user amends an existing serial number into a field.
If the serial number doesn't fall into 4 categories I want the whole entry to be removed. The categories are defined by a case statement.

Please could you point me in the right direction to remove the entire entry? The undo method only takes it back to the former state (obviously).

Thanking you in advance
 
Have you tried Case Else?
DoCmd.RunCommand acCmdDeleteRecord will delete the current record, however I strongly suggest you put a confirmation box first. If they cancel, send them back to the serial number box to re-edit and resubmit it.
 
Many thanks! Couldn't find it for looking! That worked a treat.

I will be putting in a msg to alert the user.
 

Users who are viewing this thread

Back
Top Bottom