Article View: borland.public.vdbase.data.sql
Article #913Re: Rowset navigation and field values problem
From: Romain Strieff [TeamB]
Date: Tue, 30 Jun 1998 00:00
Date: Tue, 30 Jun 1998 00:00
49 lines
1989 bytes
1989 bytes
In article <6n8ous$1gf15@forums.borland.com>, aknight@global.bw grudgingly admits... > > I am trying to use the rowset onNavigate event to populate unlinked > entryfields on my form. I am using the following code: > > function rowset_OnNavigate() > if .NOT. (form.members1.rowset.endOfset) > class::refreshUnlinked() > endif > > Whenever I try to navigate (using a grid control) I get the message: > > Error: Variable undefined: FORM > > I do, however, call the above OnNavigate function from the OnOpen event of > the query object and that does not cause an error message. I have tried > explicitly referencing the form object and passing the form object as a > parameter to the OnNavigate function but to no avail. > > Can anyone help me out here? > > If I use the 'this' keyword instead of 'form.members1.rowset' it seems to > work as it does call the refreshUnlinked function but therein lies another > problem. > > My refreshUnlinked function attempts to assign values to unlinked > entryfields on my form by performing arithmetic on fields in the rowset, > i.e: > > form.ef_balance.value = form.members1.rowset.fields["DUE"].value - ; > > form.members1.rowset.fields["PAID"].value > > This gives me: > > Error: Data type mismatch. Expecting: Object > > Huh! > > Help. I am confused. > > > Use calculated fields, they are done with BeforeGetvalue which allows you to return anything you want. -- Romain Strieff [TeamB]
Technical Details
Message-ID:
<MPG.1002f9f0a0f0a03b98aec8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6n8ous$1gf15@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,ae3b594a89ea4a34 X-Google-Attributes: gidff5a1,public From: Romain@Do.not.reply.via.e-mail (Romain Strieff [TeamB]) Subject: Re: Rowset navigation and field values problem Date: 1998/06/30 Message-ID: <MPG.1002f9f0a0f0a03b98aec8@forums.borland.com> X-Deja-AN: 367429435 References: <6n8ous$1gf15@forums.borland.com> Organization: TeamB Reply-To: teamb@opto-pps.com Newsgroups: borland.public.vdbase.data.sql