Microsoft Access 2013 - Form question
I am using the Form_BeforeInsert event to populate some fields when the user enters a new record.
When entering a new record, one of the fields that the user must enter in is [StockNumber]. The idea is to cancel record entry if the stocknumber does not exist in a lookup table. I have used
to cancel the record, but this will only wipes out the data that the user has typed in. The fields that were populated in the Form_BeforeInsert event remain.
Pressing the escape key does the trick.
I suppose I could try programmatically nulling out those fields, but this does not seem very elegant. I presume that there is a better way.
I would like programmatically cancel the new record.