Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box -Bound columns (2002)

    I have a combo box with three columns (LNFN, StudID, ParentName). STudID is the bound column.
    After you select a LNFN a form opens in add mode to that record and I have the bound StudID appear in the appropriate field. What is the easiest way to also get the ParentName to appear in the form?

    This shouldn't be that hard but I'm not getting it.

    Thanks

    Paul

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

    Re: Combo Box -Bound columns (2002)

    >>What is the easiest way to also get the ParentName to appear in the form?<<

    Not knowing where ParentName is, the easiest way is to have a textbox on the new form whose controlsource is a reference to column(2) of the combobox on the first form.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Combo Box -Bound columns (2002)

    "To open in add mode to that record" is contradictory - "add mode" means that you are creating a new record, so it is not clear what "that record" is. You can pass ParentName in the OpenArgs argument of DoCmd.OpenForm (it is the last argument of OpenForm.)

    In the On Load event of the form you open, test if you have passed OpenArgs:

    Private Sub Form_Load()
    If Me.OpenArgs <> "" Then
    Me.txtParentName = Me.OpenArgs
    End If
    End Sub

Posting Permissions

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