Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002

    Unanswered: Filling text boxes from a combo box

    My project is a "Point of Contact" database to allow me to quickly find all the information needed for a location. I work on an Air Force Base so for instance if my combo box drop down selected "Travis" I want the text boxes to display about 26 different bits of information about Travis. I tried to do it by having a multi-row combo box but it only filled about half of the text boxes on my contacts tab.

    I have my form set up as a tab control with:

    Base/Contacts/Servers/TCNO tabs along the top

    The Base tab displays fine with the code below

    Me.txtMAJCOM = Me![CboBase].Column(1)
    Me.txtUnit = Me![CboBase].Column(2)
    Me.txtStreet_Add = Me![CboBase].Column(3)
    Me.txtBldg_Num = Me![CboBase].Column(4)
    Me.txtCity_State_Zip = Me![CboBase].Column(5)

    The Contats tab is where my troubles start. Using the same logic above only half of the 26 text boxes on the Contacts tab would populate.
    Each tab has its own combo box.

    The TCNO tab is a form where I want information concerning whether or not security patches have or have not been installed on our server.

    Server table

    TCNO table
    Compliance date
    Expirations date
    Installed (Yes/No)

    Any help would be appreciated.

  2. #2
    Join Date
    Sep 2002
    There is a good example of what you are trying to do at this location:

  3. #3
    Join Date
    Sep 2002
    The link is to Microsoft, not Microsift...sorry

  4. #4
    Join Date
    Nov 2002
    Hillsboro, OR, USA

    Re: Filling text boxes from a combo box

    If the bound column of your combobox is the base id, then this should work:

    Private Sub cboBase_AfterUpdate()

    Me.RecordsetClone.FindFirst "[BaseID] = " & Me![cboBase]
    Me.Bookmark = Me.RecordsetClone.Bookmark

    End Sub

    I am assuming here that the recordset for your form is the table you want to navigate through and that all controls are bound to their coresponding fields. Make sure cboBase is unbound of course.


  5. #5
    Join Date
    Nov 2002
    I didn't have my Column Count property set high enough to show all my columns.

    I still think this could be done differently than to have a multi-column cbo box.

    I also want to have an edit and save button to the tab control but don't want to have to add one to each page.

Posting Permissions

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