× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, 2009-09-29 at 11:56 -0500, Booth Martin wrote:
I believe what I want to do is not possible however I am wrong so often
I decided to ask here.

I have a subfile with two editable columns.
I wish to validate that each code in column I is valid.
I wish to total the numeric values in column II and display the total of
column II in a field on the Control Record

If the user keys an invalid code in column I _and_ changes values in
column II I would like to issue a SFLMSG, highlight the erroneous field,
_and_ change the column II total on the Control Record.

Reasonably possible?

Well, it is not really hard, but it seems to my simple mind that such a
common task "should" have a pre-packaged solution that is easier to use
than what I did when I was writing subfile programs.

Here old memory, is what I used to do ...

First, I assume that you are already taking care of the need to
evenually get a good code in column I.

Each subfile record has a an additional hidden field, lets call it
col2summed.

Upon creation of a subfile record, set col2summed to zero and then add
column II to bothï the total on the control record and col2summed.

Upon update of a subfile record, subtract col2summed from ïbothï the
total on the control record and col2summed and then add column II
to ïbothï the total on the control record and col2summed.

Upon deletion of a subfile record, ïsubtract col2summed fromï the total
on the control record.

Is this the sort of thing you are looking for, or do you need something
different?

HTH,
Terry.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.