Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    138

    Question Unanswered: List Box on Form

    I have a table tblObserver. This table contains two fields plus a primary key - ObserverLastName and ObserverFirstName. In a form, I want the user to be able to select the Observer from a list box - those choices ONLY. I have that no problem.

    After the selection I want the name to appear on the form as follows:

    ObserverFirstName " " ObserverLastName

    Is this possible?

    Thanks!

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Yes, it is.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Dec 2003
    Posts
    138
    Care to elaborate weejas?
    Last edited by dendalee; 10-22-09 at 12:07.

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    That's the important question!

    How you go about it would depend on how you have configured the combo box. For example, if your combo box contains the two name columns from tblObserver, one method would be to put some code in the combo box's AfterUpdate event that concatenates the column values from the selected record with a space into the destination text box:
    Code:
    txtName = cboPickName.Value(1) & " " & cboPickName.Value(0)
    You might need to play with that to get it to work - it's been a while since I set up any combo boxes, and I tend to limit them to one column whne I use them. However, this ought to point you in the right direction.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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