Continuous form 'multiple loading' issue

CraigDolphin

GrumpyOldMan in Training
Local time
Yesterday, 23:50
Joined
Dec 21, 2005
Messages
1,578
I've searched but cannot seem to find the right terms to find what I'm looking for.

Here's my situation. I've been asked to develop a db for a salmon hatchery. As part of this we've developed some field forms to make it as easy as possible for the hatchery staff to use at various 'stations' along the hatchery process. They want the db forms to 'match' the field forms.

To accomplish this, I've used an unbound main form with a date control that acts as a parameter for a fairly complex query that draws information from several tables using Dlookups etc in some fields. This query is the source for a continuous subform located within the unbound main form. The user selects a date in the main form and the subform is requeried to show the data associated with that date.

The query appears to work well and I've used vba and sql to make appropriate additions/changes/deletions to records in various tables depending on what the user does on the form. All this seems to work as intended.

My problem is that whenever the user selects a date with corresponding data the form seems to 'load' the subform data several times before 'finalizing' and showing the results. I've checked the on_current event (and other portions of the mainform/subform's code modules) looking for a circular 'requery' situation but was not able to find one. There are requery references in on_click events of several controls on the subform but these should not be triggered by just loading the form should they?

I'd appreciate any suggestions. The zipped file is too large to attach or I would do so.
 
Just a guess: If you're using a Dlookup in the criteria row of your query (not recommended) you will see sloooow results...

Regards,
Tim
 
Thanks for the reply. The Dlookups in the query are not in the criteria row but instead are in the field row. When I open the query itself without the form the query opens pretty quick and doesn't load 2 or 3 times like the form does.
 
Hi, Craig

Is your DB on the same computer or split between front- and back-end? Is there any way you can mock up a test query that doesn't use the DLookups but, instead, perhaps a textbox or two on a form as the source for those fields--- something you can use to compare to your current query? Also -- just brainstorming -- have you stepped through your code, assuming there is code in your forms' load or open events?

Regards,
Tim
 
Tim, apologies for the tardy response. I got called away for a couple of days to do crab testing and didn't realize you'd responded when I got back. I thought I had checked it but I obviously misremembered. Thanks for taking the time to reply. I do appreciate it and am embarassed not to have responded earlier :o. I know I hate it when I try to help someone and they abandon the thread without some form of acknowledgement or explanation.

I was tearing my hair out over that issue and had given up the fight when serendipity stepped in and I found the cause of my problem today. Essentially, the problem occured because I had some labels on the form that were not associated/linked to a control on the form. When I removed the unassociated labels and replaced them with associated labels my re-loading/flickering problem basically went away.

Again, thanks for trying to help. :)
 

Users who are viewing this thread

Back
Top Bottom