T
tobesurveyor via AccessMonster.com
Good day to all,
I have a form which has approximately ten continous subforms each based upon
a saved query. At any given time only three are visible while the rest are
not. The load time of this form is 30-40 seconds based upon the backend
which is on a server. What I would like to try is cut down the load time by
only having three continous subforms and instead of the buttons making the
subforms visible, make it change the record source of the subform.
Before I attempt on the application I created a trial database to simulate
the above. I created a table called "tbldummy" and a continous form called
"frmsubform". The "tbldummy" table has the following fields:
dummyID & dummyname. The "frmsubform" I created a text field called
"dummyname" and who's control source is "dummyname".
On a form called frmMain I placed the frmsubform and two buttons. Button 1 I
created the following code:
Dim strNewRecord As String
strNewRecord = "SELECT * FROM tbldummy "
Me.frmsubform.RecordSource = strNewRecord
The second button's code was Me.frmsubform.Requery
I get an error message when clicking button 1 which says that command not
available and highlights the code: Me.frmsubform.RecordSource
am I doing this wrong?
Any help would be great.
Thanks,
CF
I have a form which has approximately ten continous subforms each based upon
a saved query. At any given time only three are visible while the rest are
not. The load time of this form is 30-40 seconds based upon the backend
which is on a server. What I would like to try is cut down the load time by
only having three continous subforms and instead of the buttons making the
subforms visible, make it change the record source of the subform.
Before I attempt on the application I created a trial database to simulate
the above. I created a table called "tbldummy" and a continous form called
"frmsubform". The "tbldummy" table has the following fields:
dummyID & dummyname. The "frmsubform" I created a text field called
"dummyname" and who's control source is "dummyname".
On a form called frmMain I placed the frmsubform and two buttons. Button 1 I
created the following code:
Dim strNewRecord As String
strNewRecord = "SELECT * FROM tbldummy "
Me.frmsubform.RecordSource = strNewRecord
The second button's code was Me.frmsubform.Requery
I get an error message when clicking button 1 which says that command not
available and highlights the code: Me.frmsubform.RecordSource
am I doing this wrong?
Any help would be great.
Thanks,
CF