Results 1 to 7 of 7
  1. #1
    zero3ree is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Posts
    39

    Display alternate column in a query

    I think this should be easy but I can't figure it out. I am using the Desktop Project Management template in Access and want to change a Open Project query from displaying the "id" which is a number, to the name column. In the projects table the field is set to number which is in a relationship with the employees table. Without changing any of that is there a way to run a query that will display the name instead of the number?



    Thank you in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in the current query, delete the field ID off the grid
    dbl-click NAME field in the table and it will appear in the query grid.
    now run it.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Make sure both tables are included in the query and linked on the PK/FK fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    zero3ree is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Posts
    39
    Thank you both for your responses. I got pulled away to meetings for the rest of the day so I will try this tomorrow

  5. #5
    zero3ree is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Posts
    39
    I made some images to explain this better. This is my query

    Click image for larger version. 

Name:	database.PNG 
Views:	7 
Size:	15.5 KB 
ID:	21161


    As you can see the Project, Assigned To show up as text. Project Lead was added to the query from the projects table and you can see it came in as a number not text.

    This is a connection to the query within excel. As you can see here they all changed to numbers. I know the actual field in the table says its a number for relationship reasons but how do I get them to display as text?

    Click image for larger version. 

Name:	excel.PNG 
Views:	7 
Size:	8.2 KB 
ID:	21162

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What table has the people names? Include that table in the query and link on the related Lead ID PK/FK fields between that table and Projects table. Pull the name field(s) from people table into the query grid.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    zero3ree is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2010
    Posts
    39
    That worked! Thanks for your help.

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

Similar Threads

  1. Copying hyperlink display into new column
    By pmontalt in forum Access
    Replies: 5
    Last Post: 05-13-2014, 08:34 AM
  2. Lookup Column Display
    By DDEB in forum Access
    Replies: 1
    Last Post: 05-11-2012, 04:46 PM
  3. Replies: 1
    Last Post: 12-08-2011, 08:03 AM
  4. Getting display value of lookup column?
    By kman42 in forum Access
    Replies: 2
    Last Post: 04-05-2011, 08:23 AM
  5. Multiple column display on form
    By RANCHLAW56 in forum Forms
    Replies: 1
    Last Post: 01-06-2011, 02:44 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