Results 1 to 3 of 3
  1. #1
    TrulyVisceral is offline Total N00B
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Location
    Deimos
    Posts
    102

    Unhappy Make a textbox display whatever was selected from a List.


    Ok, this wasn't one of the 2 things I needed to finish this, but I wanted to make a modification to a little edit form I got.

    Exactly as the title says, Got a textbox, I want it to display whatever was picked from a list. It's just singular column, for the service providers (values are titled as "Providers"). Having a couple buttons to go between values is fine right now, because there's only like 7 providers, but maybe they will increase later, so I have the textbox to edit values.

    I had this https://stackoverflow.com/questions/...n-another-form
    But it's not quite what I wanted.

    Literally just as title says.

  2. #2
    Minty is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Assuming your list box is called lstYourList and your textbox is called txtYourTextBox and they are on the same form (you haven't said otherwise but the link is to different forms question) then in the after update event or OnClick event simply put

    Code:
    Me.txtYourTextBox = Me.lstYourList
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    TrulyVisceral is offline Total N00B
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Location
    Deimos
    Posts
    102
    Quote Originally Posted by Minty View Post
    Assuming your list box is called lstYourList and your textbox is called txtYourTextBox and they are on the same form (you haven't said otherwise but the link is to different forms question) then in the after update event or OnClick event simply put

    Code:
    Me.txtYourTextBox = Me.lstYourList
    Boy, I was just missing the "Me" in the list part of the code. Whoops. Thanks m8.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 04-02-2018, 09:15 AM
  2. Replies: 1
    Last Post: 03-17-2015, 03:59 AM
  3. Replies: 1
    Last Post: 10-19-2014, 11:31 PM
  4. Replies: 7
    Last Post: 11-07-2011, 06:31 AM
  5. Replies: 3
    Last Post: 02-01-2011, 09:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums