Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple 'Sub' forms (2000)

    I have a main form with a cbo that I will use to select and open one of 20+ "subforms" with the After-Update event .

    Is this a case where I should use actual SUBFORMS (as defined in Access) or should I use 20+ regular forms? If the latter, how do I position the "sub" form to open where I want it (overlaying the main form, but smaller so the bulk of the main form still shows). I only see the Width property in the Form properties list.

    In addition to selecting the "sub" form with the cbo it will also cause the various sub forms to "pop-up" as I scroll thru the main form records.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple 'Sub' forms (2000)

    I can't really recommend one over the other

    You could use a tab control to contain "real" subforms. If you don't like the tabs themselves, you can set the Style property of the tab control to None and control it entirely in code. That way is easier than putting 20 subform controls on top of each other.

    If they are all the same size, you can also create one subform control and set its SourceObject property in code.

    If you want to use separate forms, you can use DoCmd.MoveSize to position them. This command acts on the active form; its syntax is

    DoCmd.MoveSize Right, Down, Width, Height

    You can omit arguments you don't want to set (but cannot omit commas except at the end). All measurements are in twips, where 1 inch = 1440 twips. "Right" and "Down" are distances from the upper left corner of the client area of the Access application window.

    See ACC2000: How to Get the Right and Down Measurements of a Form for an example of positioning one form to the right of or below another form using Windows API functions and DoCmd.MoveSize.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple 'Sub' forms (2000)

    Hans

    Thanks for the tips. I'm experimenting with the Subform control with the Source changed thru vba - seems to do the job for me. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •