Results 1 to 3 of 3
  1. #1
    lindegaard is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    1

    value from dropdown menu combined with ither text

    Hello out there

    I have made a table with drop down in sokme field and regular shoort text in others. Now in my quary i want to combine does to values of text to becomming one. one dropdown and one short text, but when i use regular "&" i get a number from the drop down and not the text value. the result is like 9Jensen instead of "text"&"text".



    Anybody have a solution here or is it impossible?

    Kind regards

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by lindegaard View Post
    ... i get a number from the drop down and not the text value...
    That is because the lookup field will store the index of your lookup, not the part that humans care about. The value stored is the ordinal position of the desired element.

    Create a copy of your Access database file.

    The solution is to not use lookup fields in your tables. Create a separate table. Include a Primary Key column in your new table using the Autonumber field. Create a second column with short text data type to store the description. Now, in your original table, delete the lookup and change the data type to a Number type that uses Long Integer as the Field Size. Use the Number type in your original table as the Foreign Key.

    Now you can store the value from the Primary Key field of your second table in the Foreign Key field of your original table. Use a query that joins the PK on the FK to retrieve the relative records of your second table.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    your drop down field (probably a look up field) actually binds to the number value that is displaying in your query (even though it displays the text); this is a feature of the look up field type that many developers rant against; although once you understand this it isn't particularly difficult to manage.

    in your query you must add the text field to the display results

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

Similar Threads

  1. Deleting Combobox/Dropdown Menu Items
    By tanyalee123 in forum Access
    Replies: 2
    Last Post: 02-27-2015, 11:42 AM
  2. Creating a dependent dropdown menu
    By RamonEJ9 in forum Access
    Replies: 5
    Last Post: 02-18-2013, 06:45 AM
  3. Replies: 3
    Last Post: 08-29-2012, 10:53 PM
  4. Replies: 3
    Last Post: 08-19-2011, 09:25 AM
  5. Can I use dropdown menu selections in a sum?
    By REAPER_110 in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 04:05 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