R
Rajesh B. Patel
Hi,
I have a form with one tab control. The tab control has 7 tabs. Each tab in
turn has 5 or more subforms in it. I am having a problem switching between
tabs after using the database splitter to separate my application for
multi-user environments. The problem is I get "Runtime Error: 3048 Cannot
open any more databases."
After doing a bit of research on the multiuser newsgroup I think that
problem is that since I set the Recordsource property on my subforms and
never unset it I am exceeding the allowable number of table ids.
As a possible fix I want to try setting the Recordsource of the subforms
that are no longer used to "Nothing". This must be doen when the user
switches tabs. How can I find out what tab I used to be on? I know I can
find out what tab I am currently on with Me.TabControl.Value, but I need
which tab I used to be on.
I need this because most my subforms all use the same underlying form and I
set the RecordSource dynamically in the TabControl's Change event. I
determine what data to populate into which subforms (the subforms are named
based on their tab number so a little routine just determines what the
appropriate names are for the subforms that are on the current tab and sets
their RecordSource property to a query that is specific to that tab number)
based on what tab I am on. So when the user switches tabs I need to wipe out
the RecordSource on the old subforms and setup the new RecordSource on the
current subforms.
I hope this makes sense.
I guess alternatively I could wipe out all subforms on every single
TabControl Change event a repopulate only the appropriate one. Do people out
there recommend I do this?
Thanks. Please let me know if I am unclear (I am sure I am...)
Thanks.
I have a form with one tab control. The tab control has 7 tabs. Each tab in
turn has 5 or more subforms in it. I am having a problem switching between
tabs after using the database splitter to separate my application for
multi-user environments. The problem is I get "Runtime Error: 3048 Cannot
open any more databases."
After doing a bit of research on the multiuser newsgroup I think that
problem is that since I set the Recordsource property on my subforms and
never unset it I am exceeding the allowable number of table ids.
As a possible fix I want to try setting the Recordsource of the subforms
that are no longer used to "Nothing". This must be doen when the user
switches tabs. How can I find out what tab I used to be on? I know I can
find out what tab I am currently on with Me.TabControl.Value, but I need
which tab I used to be on.
I need this because most my subforms all use the same underlying form and I
set the RecordSource dynamically in the TabControl's Change event. I
determine what data to populate into which subforms (the subforms are named
based on their tab number so a little routine just determines what the
appropriate names are for the subforms that are on the current tab and sets
their RecordSource property to a query that is specific to that tab number)
based on what tab I am on. So when the user switches tabs I need to wipe out
the RecordSource on the old subforms and setup the new RecordSource on the
current subforms.
I hope this makes sense.
I guess alternatively I could wipe out all subforms on every single
TabControl Change event a repopulate only the appropriate one. Do people out
there recommend I do this?
Thanks. Please let me know if I am unclear (I am sure I am...)
Thanks.