Joris de Gruyter
10/26/2005 2:43:00 PM
You can access fields generically by using their fieldids.
for example:
salesTable.CustAccount
would be the same as
salesTable.(fieldNum(SalesTable,CustAccount))
this allows you to dynamically build a list of fieldIds you need.
Next, you need to know that
SalesTable refers to the current record,
while SalesTable.orig() is of the ''SalesTable type'' but refers to the last
saved record
so, comparing
salesTable.orig().(fieldNum(SalesTable,CustAccount)) with
salesTable.(fieldNum(SalesTable,CustAccount))
will do the trick to generically check
good luck,
J.
"Kenny" <Kenny@discussions.microsoft.com> wrote in message
news:4FE7211B-4206-42B9-8316-822D77F4466B@microsoft.com...
> On the salestable form I have to prevent closing of the form when cetain
> fields are changed. So in the canclose there is functionality with all the
> checks.
>
> The problem now is that when those fields are changed and the the user
> presses esc, the form asks to save changes, but then the canclose is done
> already.
>
> So what I need is to check if a field is modified. But the normal modified
> is not enough because I don''t know what fields need to be checked before
> runtime.
>
> thx in advance