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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Issue

Status
Not open for further replies.

Ptrif

Technical User
May 19, 2003
106
0
0
US
I have a form that is used to monitor or grade employee customer service phone calls. The problem i am running into is when someone chooses say someones name on the form but then doesnt finish the form and closes it out it still writes the data to the table, is there anyway to avoid it from saving the data until the save button is pressed?

Any help or suggestions welcome!

Thank you!
Paul
 
try using form.undo in the onExit event of the form...

remember to put a form.update in your button so that it DOES save the record...

 
Is that all i put in the code is form.undo? I tried that and i still get the same result
 
How are ya Ptrif . . . .

Use the [blue]BeforeUpdate Event[/blue] of the form, its triggered each time a record is saved. You can validate the controls and use the [blue]Cancel[/blue] arguement with [blue]Undo[/blue] to roll back. Something like:
Code:
[blue]   If IsNull(Me!Text1) Or IsNull(Me!Text2) Then
      Cancel = True
      Me.Undo
   End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top