Navigation Form-clear record if user doesn't save (1 Viewer)

donsi

Registered User.
Local time
Today, 14:11
Joined
Sep 1, 2016
Messages
73
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.

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
 

kacey8

Registered User.
Local time
Today, 22:11
Joined
Jun 12, 2014
Messages
180
Surely the easiest way would be for the form to be unbound and then only write the data to the table once the user completes the form and hits save/new record?
 

Users who are viewing this thread

Top Bottom