Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Paradox Puzzle

4 views
Skip to first unread message

Bertil Isberg

unread,
Nov 17, 2004, 11:43:36 AM11/17/04
to corel.wpoffice.paradox-dev

Roger

Your second does not even open because a MB file is missing.

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://w1.826.comhem.se/~u82608896/
FAQ newsgroup: corel.wpoffice.paradox-faq

Bertil Isberg

unread,
Nov 17, 2004, 1:13:54 PM11/17/04
to corel.wpoffice.paradox-dev

Roger

Search2 when opened is using the primary key, and the range you set is based
on secondary index bytype.

If you had added errortrapping to your code, it would have been easy to
find.

if not u.setrange("A",sfield.value,s1) then
errorshow()
endif

Roger Davis

unread,
Nov 17, 2004, 3:35:21 PM11/17/04
to corel.wpoffice.paradox-dev

Bertil
Thanks for your time but I am still confused.

(I did have errorshow on the page arrive method but in trying to find what
was happening I stripped a lot of code out)

What I still don't understand is that both forms are identical, both reading
from the same table why then is Search2 reading the primary index and
search1 the secondary?

Roger

Bertil Isberg

unread,
Nov 17, 2004, 4:51:22 PM11/17/04
to corel.wpoffice.paradox-dev

Roger

<<
What I still don't understand is that both forms are identical, both reading
from the same table why then is Search2 reading the primary index and
search1 the secondary?
>>

Open the forms in design mode, and use the filter button on the Toolbar, and
you'll see that Search1 is using bytype index and Search2 is using the
primary key, because you have saved the form with that setting specified. E
g by running the form and going into design mode and saving the form, the
range specified will be saved with the form. It's better to use code
TABLEFRAMENAME.switchindex(indexname) in open event of the object after
doDefault. If you want to make sure the primary key is used, don't specify
an indexname in switchindex().

Bertil Isberg

unread,
Nov 17, 2004, 4:54:22 PM11/17/04
to corel.wpoffice.paradox-dev

Roger
<< I said>>

It's better to use code
TABLEFRAMENAME.switchindex(indexname) in open event of the object after
doDefault. If you want to make sure the primary key is used, don't specify
an indexname in switchindex().
<< / I said >>

If you do, you have to remove setRange() from page arrive and move it to
TABLEFRAME open event after the index has been switched.

Roger Davis

unread,
Nov 17, 2004, 7:27:35 PM11/17/04
to corel.wpoffice.paradox-dev

Bertil

Thank you very much for your information. I did that particular form in
1996 and it's never caused a moments trouble on any of my installations. I
never even thought about the filter setting, how stupid.

Again your time is appreciated

Roger

0 new messages