main logo
Subject: Re: force to ask if want to save?
Author: Ed Leafe
Posted: 2002/10/29 19:20:31
 
View Entire Thread
New Search


<i><font color="#663300">How can I force a button to ask if the record should be saved when the button is clicked on? whether there are changes or not...</font></i>

There are two ways: first, you can override the form's <b>IsChanged()</b> method to always return .T. - that will cause the form to ask to save changes whenever the record pointer is about to move. Second, you can call the form's <b>AskToSave()</b> method directly in situations where the framework wouldn't normally anticipate a change. Calling AskToSave() directly doesn't access IsChanged(), so it will ask whether the record has been modified or not.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
 
©2002 Ed Leafe
<-- Prior Message New Search Next Message -->