I posted a question last week asking “How to remove/Delete data when unchecking a Checkbox”. This question was answered, but in working the problem I came up with a different issue. I have explained what is happening below and ask for assistance figuring this out.
If the Return checkbox is checked, and the date and time are entered this is a complete record.
If the “Returned” checkbox is checked, and for some reason it is decided to uncheck it, which would (hide) the “Return Date” or Return Time” controls this data needs to be removed. This keep the database from having data in the table that can’t be seen on the form.
Currently the code in the Before Update Subroutine is working backwards.
On Record one (1) the checkbox is checked and both “Return Date” and “Return Time” are empty. When unchecked the message box should not fire, but it does.
On Record two (2) the checkbox is checked and both “Return Date” and “Return Time” are entered. When unchecked the message box does not fire, and both controls are made invisible leaving the data in the fields. It should give a warning from the message box.
These two conditions are working backwards of what should happen. I have studied the chkReturned_BeforeUpdate code, but just don’t see where the problem is.