Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TEDBQuery->Modified
Fri, Aug 3 2012 5:29 AMPermanent Link

IQA

Hi All,

I'm looking for the easiest way to tell if any DBFields have been changed...

I can't use the TEDBQuery->Modified property in this situation cause a
certain piece of code is run after putting the record in Edit mode,
which does infact change a few of the fields initially, and so I somehow
want to flag if any fields have been changed after that piece of code is
run and DONT want to have to add lots of OnChange events to all the
fields on the screen to flag a change.

Any ideas?

Thanks,

Phil.
Fri, Aug 3 2012 6:40 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Phil,

How about TDataSource.OnDataChange ?

--
Fernando Dias
[Team Elevate]
Fri, Aug 3 2012 8:15 AMPermanent Link

IQA


> How about TDataSource.OnDataChange ?
>
> --
> Fernando Dias
> [Team Elevate]

Hi Fernando,

Thanks for the reply... That is one option, although the program uses
that same DataSource in several places and the way the program works
it's very handy it's using the same DataSource as edits happen in one
screen then get passed to another...

I could set the OnDataChange event as the screen is shown and back to
NULL when the screen is closed, it just feels alittle messy.

I'll have a play and see how I go,

Thanks again,

Phil.
Fri, Aug 3 2012 8:25 AMPermanent Link

Uli Becker

Phil,

> I could set the OnDataChange event as the screen is shown and back to
> NULL when the screen is closed, it just feels alittle messy.

That should work fine. I use it quite often: checking if the form exists
and (to avoid useless OnChange-events) checking a variable FormReady
which is set to true in the OnFormShow-event.

OnChange

if FormExists(MyForm) then...
  if MyForm.FormReady then
....

Uli
Image