mtnsurfer22
Programmer
Does anyone know if there is a method that performs the same function as the escape key when entering new data in a datasheet?
I have a subdatasheet on a form in Access 2000. To add a new record to the datasheet a user would begin typing in the blank cell on the last row of the datasheet. This cell is a combo box so once the user starts typing they are limited to the combo box list (this is what I want). However, if they decide to abort the addition I have noticed that you can press the escape key. The text is removed as well as the temporary (or what I am guessing is a temporary record) record/row. This is the only way to abort the addition other than selecting a choice from the list box and then deleting the new record (cumbersome). Because of my data entry process after this step (adding a new selection to the combo box) I need the temporary record to be removed so that when I return after adding a new selection the combo box can be requeried. (simply placing a Null value in the text box isn't accepted either)
I want to program the "escape" functionality into my VB code so I don't have to prompt the user to 'press esc'. I have tried the CancelUpdate method but apparently simply typing in the new row on the data sheet does not begin the Edit or AddNew method and therefore CancelUpdate is not appropriate. Thanks for your help.
Eric
I have a subdatasheet on a form in Access 2000. To add a new record to the datasheet a user would begin typing in the blank cell on the last row of the datasheet. This cell is a combo box so once the user starts typing they are limited to the combo box list (this is what I want). However, if they decide to abort the addition I have noticed that you can press the escape key. The text is removed as well as the temporary (or what I am guessing is a temporary record) record/row. This is the only way to abort the addition other than selecting a choice from the list box and then deleting the new record (cumbersome). Because of my data entry process after this step (adding a new selection to the combo box) I need the temporary record to be removed so that when I return after adding a new selection the combo box can be requeried. (simply placing a Null value in the text box isn't accepted either)
I want to program the "escape" functionality into my VB code so I don't have to prompt the user to 'press esc'. I have tried the CancelUpdate method but apparently simply typing in the new row on the data sheet does not begin the Edit or AddNew method and therefore CancelUpdate is not appropriate. Thanks for your help.
Eric