Subform in MainMenu Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • veteranwebdesign

    Subform in MainMenu Form

    Hi,

    This is what I'm trying to do:

    - I have a Main Menu, on the left side are the menu items. When I
    click on the menu item, I want the form to open in the area to the
    right.

    Currently what I'm doing is double work by creating the menu items on
    each form, so if I create a new subform, I have to add a button on
    every new form so it looks flawless.

    I would like to just have the subform open in the area to the right
    using one form with only one set of menu item buttons.

    The only thing I can think of is possibly make a subform for my menus,
    not sure if that is the route to take or not, haven't thought it all
    the way through.

    Thanks,
    Donnie
  • veteranwebdesign

    #2
    Re: Subform in MainMenu Form

    So, I would try to call each subform that I need?

    Would I have to add multiple subforms, one on top of the other.

    I know I've used a tab feature before and had the menu call the tab,
    and I made the tabs hidden. But I seen someone elses database and I
    don't think they did that.

    Can you break it down a little for me?

    Something like this:

    Menu Item1 - The event on click should be

    And the subform, should have the datasource what you mentioned ealier.

    Thanks for your help.

    Donnie

    Comment

    • veteranwebdesign

      #3
      Re: Subform in MainMenu Form

      Think I'm close.

      I entered the code for the after update below.

      Private Sub MyOptionGroup_A fterUpdate()

      Select Case Me!MyOptionGrou p

      Case 1
      Me!MySubformCon trol.Form.Sourc eObject = "sbfPersonnelUp dates"
      Case 2
      Me!MySubformCon trol.Form.Sourc eObject = "sbfPersonnelUp datesTest"
      Case 3
      Me!MySubformCon trol.Form.Sourc eObject = "sbfDutySta tus"

      End Select


      End Sub

      I'm getting this error:
      Runtime Error: 2467, The expression you entered refers to an object
      that is closed or doesn't exist.

      I know all of the subforms are there, I named the sbf control as
      required, not sure what else it could be.

      Thanks

      Comment

      • veteranwebdesign

        #4
        Re: Subform in MainMenu Form

        Figure it out:

        I simply needed to create the subform control and add this to a
        command button.

        Me.MySubformCon trol.SourceObje ct = "sbfPersonnelUp dates"

        Me.MySubformCon trol This is the name of the subform control
        "sbfPersonnelUp dates" This is the name of the form I'm calling.

        This causes the form to open in the subform control.

        Comment

        Working...