Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106

    Unanswered: populate from text fields from list box

    Hi,
    Using MS Access 2007. I have a form with some text fields and a list box. The list box has 2 fields. I would like to allow the user to select a line in the list box and take the 2 values in the highlighted line and update 2 matching fields on the form. What is the best approach?

    Form fields are;
    TaskId and TaskName
    the list box fields are Task_ID and TaskName.

    Thanks
    Mo

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try:
    Code:
    Me.Text1.Value = Me.List1.Column(0)
    Me.Text2.Value = Me.List1.Column(1)
    Keep in mind that the index of the first column of a listbox or of a combobox is zero.
    Have a nice day!

Posting Permissions

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