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

Stop form from saving Rec or Undoing

Status
Not open for further replies.

dead7

Programmer
Jun 8, 2004
79
US
I have a form that when you open it it saves the record, How can I stop it from doing that if I dont want the record saved I tried
If IsNull([BENE_NAME]) Then
Me.Undo
End If
Is there a save record false or maybe onclose event to say dont save the current record unless a field is filled in
 
You can set that in your table definition.
On that certain field set the Required property to YES.


-Pete
 
Have a look at the BeforeUpdate event of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya dead7 . . .
TheAceMan1 said:
[blue]There's no way you can open a form and have it save a record, unless you have intervening code! . . .[/blue]
Check the code module of the form and post back where this condition exist! . . .

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

Part and Inventory Search

Sponsor

Back
Top