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
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
(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
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().
If you do, you have to remove setRange() from page arrive and move it to
TABLEFRAME open event after the index has been switched.
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