Update Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tranzit
    New Member
    • May 2007
    • 18

    Update Table

    I currently have a form with a combo box, text box and a button. When a selecetion is made from the combo box the corresponding data from the table is displayed in the text box.

    I want the button set up to update the table with any changes made to the data displayed in the text box.

    What code is required behind the button???

    Can anyone help???
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by tranzit
    I currently have a form with a combo box, text box and a button. When a selecetion is made from the combo box the corresponding data from the table is displayed in the text box.

    I want the button set up to update the table with any changes made to the data displayed in the text box.

    What code is required behind the button???

    Can anyone help???
    There isn't really enough information here to give you more than a basic direction. However, the first thing I can think of is to set the control source for the textbutton to the corresponding field in the table.

    Comment

    • tranzit
      New Member
      • May 2007
      • 18

      #3
      wat more do u want to know?

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        What is the name of your form?
        Is the form bound to a record source?
        What is the name of the controls, including the combo box, textbox and command button?
        What is the control source of the combo box and textbox?
        What is the row source of the combo box?
        What code is being used to populate the textbox?

        Comment

        • tranzit
          New Member
          • May 2007
          • 18

          #5
          Form Name: Form1

          Form bound to record source: Yes, Table1

          Name of controls: Combobox - Combo1, Textbox - Text1, Button - Button1

          Control source of combo and text boxs: no control source for combo box, text
          box control source is a column
          called "123"

          Row source for combo box: SELECT * FROM Table1 ORDER BY id;

          Code to populate text box: Private Sub Combo1_AfterUpd ate()
          Me!Text1 = Me!Combo1.Colum n(1)
          End Sub

          Comment

          • tranzit
            New Member
            • May 2007
            • 18

            #6
            Can Someone please help me?????

            Comment

            Working...