Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event Handling in Access 2000 1

Status
Not open for further replies.

cpsqlrwn

IS-IT--Management
Jul 13, 2006
106
US
I need to determine which control or form event to use to interrupt the save process after leaving the last field in a form. I want to provide a user confirmation for saving the record with an option for canceling back into the form to resume editing.
 
I don't know the answer to this question, but I do know that typically Acces employs record level locking. Record level locking saves each record in each field as they are typed. You may be able to add a dialog box that asks if the information is correct, but record level locking will have to be altered, or atleast I assume.

Another Idea is to add a check box to the form as the last tabed field. It could ask if the infomation is correct. If they click no you could easily pick the information out or possibly add an event if the checkbox = no.

Either way, I'll pay attention to this post to see what comes of it. Good Luck.

Nathan
 
You can do this in the form's BeforeUpdate event
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
    'Call the validation subroutine, and if it doesn't 
    'validate, abort saving changes
    If ValidateForm = False Then
        Cancel = True
    End If
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top