Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Different subforms depending on combo box choice (2002)

    Yes, I can put all the fields that I want in one table, create a tabbed subform and select the fields I want for each tab to give the look of 4 separate forms. I can do this and that is fine, but is there a way to have separate subforms that appear automagically depending on the value in the form?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Different subforms depending on combo box choi

    You can set the Visible property of the various pages of your tabbed subform to true or false in the after update event of the combo box, depending on the value selected in the combo box.

    e.g.

    if me!combosomething = 1 then
    me!TabControl.page1.visible=true
    me!TabControl.page2.Visible=false
    else
    me!TabControl.page1.visible=false
    me!TabControl.page2.Visible=true
    end if

    Here you need to replace all the names with the correct ones, and add the right condition(s)
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    St. Marys, Ontario, Canada
    Posts
    270
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Different subforms depending on combo box choi

    Thanks for everything, John. Unfortunately, this is much, much to complex for me. My learning curve on visual basic is rather steep right now. I'll just stick to cramming all the fields I need in one table and show the ones I need for each value on the tabs that apply to it.

    I do appreciate your reply, though. Maybe one day I will comprehend all of this. I understand it in principle

Posting Permissions

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