| Subject |
Re: function form_onNavigate(nWorkArea) |
| From |
Mervyn Bick <invalid@invalid.invalid> |
| Date |
Mon, 10 May 2021 15:24:27 +0200 |
| Newsgroups |
dbase.getting-started |
On 2021/05/10 13:05, roy price wrote:
> When the fields were character, they were padded with leading zero's.
> As such the syntax as I listed for character works with a similar form
> (without the seeker)in a different directory.
> In the current directory, where I've added a seeker button for the main
> table, the seeker works, but the above does not.
>
> I had already tried adding the "parent" and "parent.parent" to the line
> without success.
> Adding "parent.parent" gets "Error: Variable undefined: PARENT", the
> same if I use one "Parent"
This sounds as if you are still using the form's form_onNavigate event
handler. Please delete the damn thing. You are not going to solve your
problem until you do this.
Create an onNavigate event handler for cactusaa1's rowset and start
working from there.
'This' in the form_onNavigate event handler refers to the form.
This.parent is, therefore, equivalent to form.parent The form does NOT
normally have a parent so this.parent results in the the "Variable
undefined" error.
If you create an onNavigate event handler for the cactusaa1 rowset this
refers to the rowset. This.parent refers to the query and
this.parent.parent refer to the form
> The field is indexed and named "rec". I deleted the index saved the
> table, and then recreated it, to no avail.
What is the index expression used to create the index?
> I'm confused as to why the syntax for a character field works for
> records containing numbers that are over 1000, but not those under 1000.
> Should it not work at all?
It's working for four character values because these don't need padding
to fill the field. There is, therefore, no problem finding the
corresponding value in the second table.
It's not working for 1, 2 and 3 character values because the rec fields
in the two tables are not padded in exactly the same way.
Mervyn.
|
|