Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2002
    Posts
    23

    Talking Unanswered: Need some help with subforms

    Hi All,

    I have a main form with a combo box. I want to set this up so that whatever is selected from the combo box, a corresponding subform with another combo box will open in the main form. I've made all the subforms, but I don't know how to set this up so they appear on the main form depending on what is selected in the main combo box.

    Could ya help me out?

    Thanks,
    Johnny

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    You need to set your child parent relationship between your subform and parent form.

    I would imagine from what you have described you wnat different forms appearing depending on the value in your combo box. The process to do this would be to place one subform at a time on top of the preceeding subform, hooking the relationships up as you go, and set some code in the after update event of the combo box telling it to llop through the subforms and make all invisible and then change the one you want visible.

    HTH

  3. #3
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33

    Re: Need some help with subforms

    Hi again,
    Please see attachment - it does not use any data and preatty self-explanatory. the workings explained in reply to your other post - http://dbforums.com/showthread.php?threadid=579192
    HTH

    Originally posted by MountJohnny
    Hi All,

    I have a main form with a combo box. I want to set this up so that whatever is selected from the combo box, a corresponding subform with another combo box will open in the main form. I've made all the subforms, but I don't know how to set this up so they appear on the main form depending on what is selected in the main combo box.

    Could ya help me out?

    Thanks,
    Johnny
    Attached Files Attached Files

  4. #4
    Join Date
    Oct 2002
    Posts
    23

    Re: Need some help with subforms

    Thanks for the help! One more quick question, in the event procedure for the combo box:

    Me![frmSubForm].SourceObject = "frmSubForm" & Me![Combo0]
    Me![frmSubForm].Visible = True


    I'm not sure how the different values for the combo box (i.e. 1,2,3) are matched up with the corresponding subform. Could you explain this to me?

    Thanks,
    Johnny
    Originally posted by Alec
    Hi again,
    Please see attachment - it does not use any data and preatty self-explanatory. the workings explained in reply to your other post - http://dbforums.com/showthread.php?threadid=579192
    HTH

  5. #5
    Join Date
    Oct 2002
    Posts
    23

    Re: Need some help with subforms

    Sorry, I figured this out. Thanks again for the help!

Posting Permissions

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