Hi
In my database, I have a couple of forms to enter data.
If I open one of these forms then close it again without entering anything, no new record is saved. However, if I enter data into the first field, tab to the next, then decide not to enter the date and delete all fields and close the form, I end up with blank records.
I understand how this occurs, but how can I stop it occurring? I thought of regularly running a delete query to remove all blank records, however cannot link the delete query to a command button. I am sure there is a simple way to link the delete query to the 'On Close' property of the appropriate form, but cannot work the code out for that.
Is this the right way to go, or should I be looking at stopping the null entry before it happens.
Any advice appreciated.
In my database, I have a couple of forms to enter data.
If I open one of these forms then close it again without entering anything, no new record is saved. However, if I enter data into the first field, tab to the next, then decide not to enter the date and delete all fields and close the form, I end up with blank records.
I understand how this occurs, but how can I stop it occurring? I thought of regularly running a delete query to remove all blank records, however cannot link the delete query to a command button. I am sure there is a simple way to link the delete query to the 'On Close' property of the appropriate form, but cannot work the code out for that.
Is this the right way to go, or should I be looking at stopping the null entry before it happens.
Any advice appreciated.