W
Warrio
Hello!
I have a form that contain a subform. Both have their own recordsource
connected through a link master and child field.
The problem is I noticed that opening the main form I using the where
condition:
DoCmd.OpenForm "myForm", , , "mainID=" 3
makes the form loading too slow, because the main and sub form contain a
query on the hole table. So what it does is that Access loads all the
records and then filter on the ID that the user is interested in.
the alternative that I've tried to use was to leave the recordsources blank
and to write them by code and adding to each one the where clause:
mySubForm.recordsource= "SELECT ... FROM ... WHERE mainID=3"
myMainForm.recordsource="SELECT ... FROM ... WHERE mainID=3"
the result didn't make any change of performance on the loading time of the
form.
Any Advice on how to open such a form quicker?
Thanks in advance!
I have a form that contain a subform. Both have their own recordsource
connected through a link master and child field.
The problem is I noticed that opening the main form I using the where
condition:
DoCmd.OpenForm "myForm", , , "mainID=" 3
makes the form loading too slow, because the main and sub form contain a
query on the hole table. So what it does is that Access loads all the
records and then filter on the ID that the user is interested in.
the alternative that I've tried to use was to leave the recordsources blank
and to write them by code and adding to each one the where clause:
mySubForm.recordsource= "SELECT ... FROM ... WHERE mainID=3"
myMainForm.recordsource="SELECT ... FROM ... WHERE mainID=3"
the result didn't make any change of performance on the loading time of the
form.
Any Advice on how to open such a form quicker?
Thanks in advance!