Help with slow form

I have a form that is loading very slowly. I have narrowed down one of the slow spots to something that is happening right between the execution of the last computed for display field and the beginning of the PostOpen event. Does anyone have any idea what might be executing at this step?

Subject: Help with slow form

It’s not easy to help without seeing any code at all, so it has to be general advice on this matter:

There are many things that can slow down a form; The biggest issue is with @DbLookup and/or @DbColumn. Try to have as few of those calls as possible on the form. That will do tremendously much for the loading speed.

What You describe sounds like You have a lot of CFD-fields that do a lot of math, or lookups. Cut it down if it’s possible.

What does the PostOpen event do? If You are changing values in the form, the CFD fields might need to be recalculated and that might slow things down.

Regarding lookups: Here is an article covering the issue of coding faster lookups:

hth

Subject: Help with slow form

Mike,

I’m curious about what would execute between those two things. Perhaps it’s the last computed fields? Or the beginning code in your postopen event?

Have you put a print statement at the beginning of postopen event? Have you unhidden your fields and put them on separate lines so you can easily see each one draw on the screen?

curious,

raphael

Subject: RE: Help with slow form

I created 2 CF fields with an @Prompt in the formula. I put one at the top of the form and the other at the bottom.

I may be incorrect, but I assumed that the last @Prompt would only come up after all of the other fields had calculated. And yes, I added msgbox statements to the queryopen, postopen, etc. events.

The time between the first and last prompt fields is only a second or two. Then there is a 20-30 second time between the last prompt and the beginning of the postOpen. So either my assumptions are incorrect, or there is something happening between the last field calculation and the start of the postOpen. I will try some more experiments and see what I can find. Thank you both for your suggestions.