Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    14

    Unanswered: Complete Newbie... still learning

    Hi all,

    Ive had some great advice here not so long ago.. Can I impose for some more? Again, its just about methodolgy more than anything.

    Heres the story.

    Bulding Contacts Db in Access2003. Right now I am trying to create 2 distinct forms. A member create and a member lookup.

    Form 1. Member input. When user enters info. They need to specify, a member type by a linked combo box. The resultant inputs are all different dependant on member type. (In the underlying tables, I have one for member type table, linked to varying member type information tables). Should I be using different subforms here? How do I specify to open ONLY the correct subform? Is this a macro? Suggestions?

    Thanks all.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    either you love subforms or you hate them: i love them.

    in the mother form your user is selecting from a combo called myCombo that has a .boundcolumn returning 1, 2, etc
    mother has a subform control called mySubformGoesHere
    you have a series of candidate subforms mySubform1, mySubform2 etc


    in myCombo_AfterUpdate()


    select case myCombo
    case 1
    mySubformGoesHere.sourceobject = "mySubform1"
    case 2
    mySubformGoesHere.sourceobject = "mySubform2"
    ...etc
    end select

    also consider a "mySubform0" set as default .sourceobject (from designtime and/or from mother form_Load) that holds just a caption: "Select something from the combo"

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    May 2006
    Posts
    14
    Thanks for the reply Izy. Still having trouble though, and all my supposed access literate mates are useless! Ive tried following your suggestions and while I appreciate the logic, I can't seem to get it to work.

    okay.. step by step... the afterupdate.. thats a function of 'properties' for the combo box on my mother form? *Membertype dropdown.

    how do i associate the subforms *subfrmPersonal *subfrmCorporate etc. to the fields selected from my membertype dropdown?

    Am I making sense? Even to myself? Ive started to wonder..

    Cheers!

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i can't answer in text without being stupidy pedantic...
    ...demo follows in 10 minutes

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    here you go

    izy
    Attached Files Attached Files
    currently using SS 2008R2

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    e.g. mdb uses a value list for the combo
    NOTHING changes if you use a table to feed the combo:

    the combo has a value (.boundcolumn)
    my e.g. uses 1, 2, 3 as it's .boundcolumn values

    you use the real "values" of your combo XXxxxx
    as the various
    Case XXxxx
    Case Yyyyy
    in the Select Case/End Select construct
    ....and it switches in your real subforms

    izy
    currently using SS 2008R2

  7. #7
    Join Date
    May 2006
    Posts
    14
    Izy, Above and beyond the call of duty. I have it sorted now. Very much appreciated. It took awhile to sift through and assimilate, but done and done, I owe you a pint! Thankyou, thankyou my friend.

Posting Permissions

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