If I close a Form and a control, [Serial #], is left blank (Null), what code in vb do I put in to delete the record that's currently showing? At the moment, my coding gives me the MsgBox stating that selecting Yes will delete the record, but it doesn't delete it, obviously I have that bit of coding wrong, the code I have written is attached to the Form's OnClose property. What I need is to select 'Yes', and the current record showing is deleted and a MsgBox confirms it's deleted successfully, or, if I select 'No' the Form does not close and a MsgBox says record not deleted. (The Form in question is called RSdata).
That little bit of hair left on my head is getting less and less, any help will be appreciated.