In my Navigation form, I have few tabs. If user is using of the tab to enter data, and in the process(in case incorrect tab select) if user clicks on the other tab, it will create a record on the table. I would like to eliminate that since it is creating false records and I have to clean it every day. I have a Clear button on the form which undos the record, but some forgets to use it. So how would I be able to force users to either click Clear button or simply undo the record if they click on another tab without click "Submit" (saves the record)
I tried below code for OnClose event of the form to see if one of the field is filled when user is clicking on another tab, force them to click Clear. But doesn't seems to be working.
I tried below code for OnClose event of the form to see if one of the field is filled when user is clicking on another tab, force them to click Clear. But doesn't seems to be working.
Code:
Private Sub Form_Close()
If Not IsNull(GDate) = False Then
MsgBox "Please click Clear prior to moving to next tab", vbCritical, "Clear the Record"
End If
End Sub