Results 1 to 4 of 4
  1. #1
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41

    Displaying Lookup Value in Textbox

    I have a continuous form bound to an EVENTS table. In the events table there is a column BUILDING_ID. BUILDING_ID is currently setup as a lookup value in the EVENTS table. Anyways, I have the BUILDING_ID textbox on my continous form but I want it to display the full name of the building from the BUILDINGS table, based upon that BUILDING_ID.. But I don't want to do it with a combobox. I just want a regular textbox.



    I hope this makes sense. Thanks in advance for your help.

    Thanks

  2. #2
    JoeKra is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    1

    Displaying Lookup Value in Textbox

    You can add a hidden combo box and set the text box control source to the column you want to see

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    If you are using Lookup FIELDS (in a table), this is a bad idea.
    See: The Evils of Lookup Fields in Tables http://access.mvps.org/access/lookupfields.htm

    You do not gain anything because in a lookup field (essentially a combo box):
    - in a table, the actual value in the field is "hidden"
    - you have to set up the same "combo box" on a form.

    Back to your question, instead of using a table for the form record source, use a query. Virtually all of my forms use queries for the record source.

    Join the EVENTS table with the BUILDING table on BUILDING_ID. Then add the full name of the building to the query. Set he text box control source to the Building Name.

  4. #4
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41
    Thanks everyone for the replies. I am actually maintaining a legacy database and its painful because the prior DBA used lookup fields on everything. I decided to just start over and rebuild the tables.

    Thank you for all the responses.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2012, 12:53 PM
  2. Replies: 17
    Last Post: 12-20-2011, 04:36 PM
  3. Displaying a total textbox in a subform
    By rmohebian in forum Access
    Replies: 3
    Last Post: 02-08-2011, 01:05 PM
  4. Replies: 9
    Last Post: 01-21-2011, 03:57 PM
  5. Lookup from Textbox
    By mastromb in forum Forms
    Replies: 4
    Last Post: 01-02-2010, 07:59 PM

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