Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SubForm ComboBox (A2K)

    Let
    Cheers,
    Andy

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

    Re: SubForm ComboBox (A2K)

    Yep, that is a clearly presented question. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    You can set the Row Source of the combo box to something like

    SELECT * FROM tblPersonnel WHERE CorporationID = Form!CorporationID

    with the appropriate field name subsituted. You also need a bit of code to update the row source if you move to another record in frmCorporations:

    Private Sub Form_Current()
    Me.subfrmPersonnel.NameOfTheComboBox.Requery
    End Sub

    Here subfrmPersonnel must be the name of the subform as a control on the main form - this is not necessarily the same as the name of the subform in the database window. And NameOfTheComboBox is the name of ... well, you guessed it.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SubForm ComboBox (A2K)

    Hans, once again, thanks for the quick, and as always, accurate response.
    Cheers,
    Andy

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: SubForm ComboBox (A2K)

    Nicely presented question! I think we ought to save this to use as a "How To" for newbies to the forum!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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