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

Cancel Button Behaving Strangely 2

Status
Not open for further replies.

hsp7777

Programmer
Jan 11, 2005
67
US
Greetings,
I have a popup form which has several fields that are bound to a table. When I choose the "Cancel" button on this form, however, the changes I have made to these bound controls are saved. The code I have in the "Click" event of the "Cancel" button is below. I have also set the "Cancel" property to "Yes". Any idea as to why this is happening? I am baffled.

Thanks in advance!

Private Sub cmdCancel_Click()
DoCmd.Close acForm, "frmLoanLog", acSaveNo
End Sub

hsp7777
 
You may consider Me.UnDo before the close.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
To add a little explanation to PHV's suggestion, the save arguement/parameter of the close method of the docmd object concerns whether or not to save design changes to the form, and not the current record.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top