Well, there are a bunch of potential issues. Since you might have the
form already open (I assume because of your attach) it will show up
faster if it is already open but you don't control the z order or even
do a bringtotop on the attach. For finding the record, if the field you
are searching on is a key field (probably should be a unique integer ID
for the person) then a qlocate will be faster as you will use the index.
If you bring the form to the top the delay in the other form close may
be irrelevant (and may be related to all sorts of things like code in
the close method, open tcursors you haven't cleaned up etc.) but if it
bothers you look at that sort of stuff and also consider doing a hide()
just before the close so you don't have to watch it close.
Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and
non-profits since 1982
Kenneth wrote:
>
> Howdy,
>
> I have a form that is used for a particular search process.
> It works fine, but with an odd delay.
>
> Here's how it is used:
>
> We enter on another form the criteria for a search of our
> database. Those might be "Jones" (in the lastNameField) and
> 54321 (in the zipCodeField.)
>
> Next, the form in question (called SEARCH.FDL) opens
> displaying all the records that meet the criteria.
>
> The user scrolls down to the person whose record they wish
> to view, touches enter, and another form (called PEOPLE.FDL)
> then searches for, and displays that individual's record.
>
> And this is the odd behavior:
>
> Almost without exception, when the user touches Enter, the
> PEOPLE form is already open, and is visible beneath the
> SEARCH form (but pointing to another record.)
>
> Then, in about two seconds, the PEOPLE form moves to the
> chosen record, but the SEARCH form remains open for another
> five seconds or so.
>
> Why might the SEARCH form take so long to close itself? (Or
> might there be a way to see the PEOPLE form more quickly
> while the SEARCH form takes whatever time it needs to
> close?)
>
> Here's the code on the SEARCH form that finds the proper
> record:
>
>
> method keyPhysical(var eventInfo KeyEvent)
> var
> People form
> EndVar
>
> if eventInfo.vCharCode()=VK_Return then
> disableDefault
> setMouseshape(mouseWait)
> If people.attach("PeopleKS") then
> People.num.Locate("num",num)
> People.moveto()
> else
> People.Open("PeopleKS",winStyleDefault+winStyleHidden)
> People.num.Locate("num",num)
> People.bringToTop()
> endif
> self.close()
> endIf
> endMethod
>
>
> Thanks for any suggestions,


|