Hello everyone-
I have a form that has multiple fields, each of which are bound to a column on a table. Four of the fields are required fields, and cannot be left blank. I am coming across an issue on the form when people fill in some required fields, but not all, then they try to navigate either to a different record, or else try to close the form.
When they do either of these things when the required fields are blank, it gives this error message:
"The Microsoft Jet database engine cannot find a record in the table 'tblAsset' with the key matching field(s) 'AsetID'.
If they close the form or move to a different record (via the record navigation buttons) and the four required fields ARE filled in, it save the record and then moves or closes.
So I need to find a way to catch the close of the form, or the move to the next record before they actually happen. That way I can check those four fields and prompt the user and cancel the action, instead of getting the error.
Does anyone know what sub procedure gets called in these two instances? Record navigation, and form close.
I've played with Form_Close and Form_Unload in an attempt to fix the closing the form part, but these are not right. The error pops up before those events even get fired.
Any suggestions? Thanks!
I have a form that has multiple fields, each of which are bound to a column on a table. Four of the fields are required fields, and cannot be left blank. I am coming across an issue on the form when people fill in some required fields, but not all, then they try to navigate either to a different record, or else try to close the form.
When they do either of these things when the required fields are blank, it gives this error message:
"The Microsoft Jet database engine cannot find a record in the table 'tblAsset' with the key matching field(s) 'AsetID'.
If they close the form or move to a different record (via the record navigation buttons) and the four required fields ARE filled in, it save the record and then moves or closes.
So I need to find a way to catch the close of the form, or the move to the next record before they actually happen. That way I can check those four fields and prompt the user and cancel the action, instead of getting the error.
Does anyone know what sub procedure gets called in these two instances? Record navigation, and form close.
I've played with Form_Close and Form_Unload in an attempt to fix the closing the form part, but these are not right. The error pops up before those events even get fired.
Any suggestions? Thanks!