This is the scenario
1 - you have a table with one column: col (stores current date)
2 - you create a form with datasheet default view
3 - for some reason, you want to write a little vba that has the following effects when you press enter key:
a - the entered value never gets into the database
b - the field in the data sheet control is cleared
Expand|Select|Wrap|Line Numbers
- Private Sub col_BeforeUpdate(Cancel As Integer)
- Cancel = true;
- end sub
Things tried that didn't work (throw errors):
Expand|Select|Wrap|Line Numbers
- Me.col = Null
- Me.col = Nothing
Thank you very much