Hi,
I have a subform, which is a continuous form. If I start to enter data on the 'addnew' line, then press the Escape key, this erases the data I have just entered.
I would like to replicate this action in my VBA code. If a user attempts to add a duplicate, I give a message, asking if they would still like to add the record. If they enter 'no', I would like to wipe out the data they have started to enter. Currently, the only code I have for 'no' is 'cancel=true'. I tried to add 'me.undo' but this didn't erase the data.
Any suggestions?
Many thanks, in advance.
I have a subform, which is a continuous form. If I start to enter data on the 'addnew' line, then press the Escape key, this erases the data I have just entered.
I would like to replicate this action in my VBA code. If a user attempts to add a duplicate, I give a message, asking if they would still like to add the record. If they enter 'no', I would like to wipe out the data they have started to enter. Currently, the only code I have for 'no' is 'cancel=true'. I tried to add 'me.undo' but this didn't erase the data.
Any suggestions?
Many thanks, in advance.