Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simplest way to detect change on a form?

1 view
Skip to first unread message

Jack E. Wasserstein, DDS, Inc.

unread,
Nov 25, 2004, 2:08:22 PM11/25/04
to corel.wpoffice.paradox-dev

I want to know if someone has changed a value on a form on any of the forms
numerous fields. If so I want to prompt the user to save their changes.
(currently the form uses a temp table to store values, when the user selects
"save" from a menu item I use to code to transer the values to the server's
table) The problem is if they forget to save their data they will lose it
next time they open a different account. So I would like to use some code
that will detect a change, perhaps set some variable, then evaluate the
variable if they want to exit or open a differnt account. I could handle the
rest from there.

Would it be to use the form's changeValue or NewValue with eventinfo?

Thanks,

Jack

Bertil Isberg

unread,
Nov 25, 2004, 3:48:01 PM11/25/04
to corel.wpoffice.paradox-dev

Jack

form level changeValue() event , the 'if then clause' should execute

but also form level action event, the else clause should get an action with
eventInfo.id()=DataUnlockrecord.

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://w1.826.comhem.se/~u82608896/
FAQ newsgroup: corel.wpoffice.paradox-faq

Anders Jonsson

unread,
Nov 25, 2004, 3:51:40 PM11/25/04
to corel.wpoffice.paradox-dev

You could use changevalue, then use eventinfo.newvalue() to check if the
newvalue is different from the old, if so set a flag.

If the user hit your save button you send the data to the server and reset
the flag.

You should also trap for the action MenuCanClose and check the flag there so
the user don't close the form (or Paradox) without saving the data.

Anders Jonsson

"Jack E. Wasserstein, DDS, Inc." <Ja...@Wasserstein.com> skrev i meddelandet
news:41a62778$1_2@cnews...

Jack E. Wasserstein, DDS, Inc.

unread,
Nov 27, 2004, 12:37:21 AM11/27/04
to corel.wpoffice.paradox-dev

Thanks for the help. How can I trap menuCanClose?

Jack

"Anders Jonsson" <g...@takethisawaybredband.net> wrote in message
news:41a63fb9$1_3@cnews...

Anders Jonsson

unread,
Nov 27, 2004, 3:02:17 AM11/27/04
to corel.wpoffice.paradox-dev

> Thanks for the help. How can I trap menuCanClose?
>
> Jack

You can put code in the menuAction of the form and trap for

eventinfo.id()=MenuCanCLose


Anders

0 new messages