Multi-Use Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FireMedic
    New Member
    • Mar 2007
    • 17

    Multi-Use Forms

    In my current project I would prefer to save space by reusing an equipment inventory form to display, edit and enter data for several different categories of equipment. Data is stored in several tables with some variation in number of fields and data types.

    Essentially I know how to set RecourdSource through VBA but am not sure of the best way to set corresponding control labels and data types etc.

    For that matter is this worth the trouble or am I better off using multiple forms as subforms and setting their visible property according to the category button that's clicked? We're talking about 10 different but very similar forms.

    ie: Apparatus (Pumpers, Ambulances etc., Fire Equipment, Medical Equipment, etc.

    Thanks for any help or suggestions
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by FireMedic
    In my current project I would prefer to save space by reusing an equipment inventory form to display, edit and enter data for several different categories of equipment. Data is stored in several tables with some variation in number of fields and data types.

    Essentially I know how to set RecourdSource through VBA but am not sure of the best way to set corresponding control labels and data types etc.

    For that matter is this worth the trouble or am I better off using multiple forms as subforms and setting their visible property according to the category button that's clicked? We're talking about 10 different but very similar forms.

    ie: Apparatus (Pumpers, Ambulances etc., Fire Equipment, Medical Equipment, etc.

    Thanks for any help or suggestions
    If the know how to set the RecordSource, you have 1/2 the problem solved. The other 1/2 would be to set the SourceObject Property of the Sub-Form Control in order to identify the new Source (Form) of the Sub-Form.
    Code:
    'Change the Source (Form) for your Sub-Form
    Me![[B]your Sub-Form name[/B]].SourceObject = "subfExpendedItems"

    Comment

    • FireMedic
      New Member
      • Mar 2007
      • 17

      #3
      Originally posted by ADezii
      If the know how to set the RecordSource, you have 1/2 the problem solved. The other 1/2 would be to set the SourceObject Property of the Sub-Form Control in order to identify the new Source (Form) of the Sub-Form.
      Code:
      'Change the Source (Form) for your Sub-Form
      Me![[B]your Sub-Form name[/B]].SourceObject = "subfExpendedItems"
      Aha!!
      Thank you, that worked great.
      I'm not as concerned with having a lot of near-duplicate forms in the Dbase as I am with having to load a pile of them at once and make them visible one at a time. I'm sure that would be a real drag on the speed of the app. Thanks again.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32634

        #4
        Considering ADezii's experience with fire-prevention and departments, it's entirely appropriate that he found and helped with your problem :)
        You could be in lots worse hands.

        Comment

        • FireMedic
          New Member
          • Mar 2007
          • 17

          #5
          Originally posted by NeoPa
          Considering ADezii's experience with fire-prevention and departments, it's entirely appropriate that he found and helped with your problem :)
          You could be in lots worse hands.
          Yes Indeed ... Like my own..Yikes... His assistance is much appreciated.

          Comment

          Working...