Setting subforms Sourceobject. Dangerous?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    Setting subforms Sourceobject. Dangerous?

    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:
    Code:
    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.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    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)

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      Originally posted by TheSmileyOne
      Is there any "danger" in doing this?
      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.

      Comment

      Working...