K
KesAFloyd
I would like to prevent accidental overwriting of data in my database.
I don't want to absolutely restrict overwriting, because in some cases
it may be necessary, but I'd like to prevent accidental errors.
My strategy is to have a popup that warns the user that they are about
to change a field that already has contents. They then choose whether
they want to overwrite or not. Basically, there are three macros,
where the first launches a form that has button options to run the
second and third. It is set to appear BeforeUpdate.
1. Open Alert:
OpenForm
2. Don't Overwrite:
Close
RunCommand (Undo)
3. Overwrite:
Close
The problem is, I don't know how to get this popup to only appear when
the field already has contents. I imagine this has something to do
with checking whether it's Null or not, but I don't know the syntax. I
would like this code to be universal, not specific to a single field
but rather across all the fields in the data entry form.
I have a hunch this requires VBA, but I'm not sure.
Thanks,
Alexandra
I don't want to absolutely restrict overwriting, because in some cases
it may be necessary, but I'd like to prevent accidental errors.
My strategy is to have a popup that warns the user that they are about
to change a field that already has contents. They then choose whether
they want to overwrite or not. Basically, there are three macros,
where the first launches a form that has button options to run the
second and third. It is set to appear BeforeUpdate.
1. Open Alert:
OpenForm
2. Don't Overwrite:
Close
RunCommand (Undo)
3. Overwrite:
Close
The problem is, I don't know how to get this popup to only appear when
the field already has contents. I imagine this has something to do
with checking whether it's Null or not, but I don't know the syntax. I
would like this code to be universal, not specific to a single field
but rather across all the fields in the data entry form.
I have a hunch this requires VBA, but I'm not sure.
Thanks,
Alexandra