Text boxes populating from combo box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Susy Fernandez
    New Member
    • Jul 2010
    • 2

    #1

    Text boxes populating from combo box

    I have a form in MS Access 2007 with a combo box (Combo30) and two text box (ID & EntityType) populating from a combo box. When I select information on combo box both boxes get populated ok. However, when I select the following information, the new information replaces the old one.

    'Find the record that matches the control.
    'Update the row source of Text47 Textbox
    'when the user makes a selection in Combo30
    'combo box.

    Private Sub Combo30_AfterUp date()


    If Not IsNull(Me!Combo 30) Then

    Me!Institution. Value = Me!Combo30.Colu mn(0)
    Me!ID.Value = Me!Combo30.Colu mn(1)
    Me!EntityType.V alue = Me!Combo30.Colu mn(4)
    Me.Refresh

    End If

    End Sub

    Also, when I come back to the form, the data is not saved.
    I'm going crazy with this!! Can someone help?
  • Susy Fernandez
    New Member
    • Jul 2010
    • 2

    #2
    Originally posted by Susy Fernandez
    I have a form in MS Access 2007 with a combo box (Combo30) and two text box (ID & EntityType) populating from a combo box. When I select information on combo box both boxes get populated ok. However, when I select the following information, the new information replaces the old one.

    'Find the record that matches the control.
    'Update the row source of Text47 Textbox
    'when the user makes a selection in Combo30
    'combo box.

    Private Sub Combo30_AfterUp date()


    If Not IsNull(Me!Combo 30) Then

    Me!Institution. Value = Me!Combo30.Colu mn(0)
    Me!ID.Value = Me!Combo30.Colu mn(1)
    Me!EntityType.V alue = Me!Combo30.Colu mn(4)
    Me.Refresh

    End If

    End Sub

    Also, when I come back to the form, the data is not saved.
    I'm going crazy with this!! Can someone help?

    I've seen that 36 people have viewed my question. Please let me know if anybody can help...I need this answer by tonight. I'm trying to populate 2 text boxes from a combo box and the data is not saving. When I come back to the form, the data is gone. Also, when I select new data it replaces the old on ALL my entries. Please advise. Thanks!!

    Comment

    • TheServant
      Recognized Expert Top Contributor
      • Feb 2008
      • 1168

      #3
      Originally posted by Susy Fernandez
      I've seen that 36 people have viewed my question. Please let me know if anybody can help...I need this answer by tonight. I'm trying to populate 2 text boxes from a combo box and the data is not saving. When I come back to the form, the data is gone. Also, when I select new data it replaces the old on ALL my entries. Please advise. Thanks!!
      I imagine that your deadline has passed, which is unfortunate. You should have posted in the Microsft Access/VBA forum.

      Comment

      Working...