473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Setting subforms Sourceobject. Dangerous?

TheSmileyCoder
2,322 Expert Mod 2GB
Im using a subform control on my main form.

Depending on which button I click, I will swap the sourceobject of the subform control.

So clicking the button for frmExample, i would do:
Expand|Select|Wrap|Line Numbers
  1. subFrmControl.SourceObject="frm_Example"
Is there any "danger" in doing this?

I realise I could also just load all the various subforms, and then either put them in a page tab control, or show/hide them when people click the buttons.
However, this aproach means that the frontend only "retrieves" the Data from the backend for the subform the user wants to see, which can save a bit of time for people on a slow connection.
Jan 23 '10 #1
2 1977
nico5038
3,080 Expert 2GB
It's all about the response time being once slow and than fast or every time "mediocre".
In general I prefer to go for a "slow start" and fast afterwards, as people tend to forgive the long startup (compare starting MS Windows) and remember the speed afterwards. So I would use a tabbed control with all subforms.
Only when the initial loading time isn't acceptable I would switch to your "dynamic" option.

Nic;o)
Jan 23 '10 #2
NeoPa
32,556 Expert Mod 16PB
@TheSmileyOne
Not that I'm aware of.

Nico has made a point worth considering. From there I guess you would see if the time cost of the load is appreciable. If it is, then consider the tabbed approach. If not, you have a pretty sweet and clever solution.
Jan 24 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: CSDunn | last post by:
Hello, I have an Access 2000 ADP main form called frmAD_OpeningForm that needs to support several possible sub forms. The subform that should appear would be based on the combined bound values...
3
by: CSDunn | last post by:
Hello, I currently have an Access 2003 ADP Report/Subreport set up in which I have 12 subreports in a single main report that are located in a group header called 'PermnumHeader' (Permnum would be...
1
by: Jimart | last post by:
Hi I Have A Main Form this form has a Subform The SourceObject for the Subform is another subform. I have mastered changing the SourceObject, so that I can have different Subforms appearing...
1
by: deko | last post by:
I have a popup "Tools" form with a tab control that has a different subform on each tab. The problem is that new tabs/subforms continue to be added as users request new features - so the code on...
1
by: Ecohouse | last post by:
I have a main form with two subforms. The second subform has a combo box whose recordsource is set based on a field in the first subform. I tried putting some code in the first subform to do...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform relates to the main form using an identity key (this works). The second subform relates to both the main and first subform. But I want to...
1
by: tarabztk | last post by:
MSACCESS 2003 : How to use command buttons to display different subforms I have an application that display information about Pipelines and these pipelines have many other equipments attached to...
9
by: frys | last post by:
Access 2003 Windows XP I have a form that is for tracking attendance at programs. the main form is the program information, and the sub form is the attendance information. I have 5 homes...
0
by: sparks | last post by:
I was using this to swap out a form with subforms on it by just making a copy and tying each to copy of the same table. subformV1 tblVisit1 subformV2 tblVisit2 etc Select Case TabCtl0.Value...
64
by: lovelydan | last post by:
hi all i need someone to help me with a code that will enable me filter records in a subform form through a combo box attached to a mainform-that has a main menu that controls all the sub form...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.