Results 1 to 12 of 12
  1. #1
    tipopilotas is offline Novice
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    5

    Report Showing ID number and not the name


    I am creating a report and it is showing the number associated with that particular line and not the name itself. I know this is probably really simple but just trying to figure out how to fix this.

    Thank you

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Presumably you have a data table that this report is based on, and a lookup table with the numbers and names. You would base your report on a query that joined your data table with this "lookup" table. That enables you to include fields from both tables in the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tipopilotas is offline Novice
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    5
    Quote Originally Posted by pbaldy View Post
    Presumably you have a data table that this report is based on, and a lookup table with the numbers and names. You would base your report on a query that joined your data table with this "lookup" table. That enables you to include fields from both tables in the report.
    I tried doing that and the same result. For the company field it shows the ID number associated with that company and not the name, however on the query it shows the company name in that field.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Are you joining the tables? It sounds like you have a lookup field:

    http://www.mvps.org/access/lookupfields.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tipopilotas is offline Novice
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    5
    Quote Originally Posted by pbaldy View Post
    Are you joining the tables? It sounds like you have a lookup field:

    http://www.mvps.org/access/lookupfields.htm
    What I am doing is creating a query off of a table that I have created for a list of items. Yes within that table it does have lookup fields. Is there another way to create these tables and do the same thing for looking up info? An example would be I have a table with employee names, however I want another table to tap into that table to let me pick an employee to add into it. And I want to run a report that shows all this info and not just numbers.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Typically you use a combo box on a form. The combo gets its values from the lookup table. Often the numeric key value is hidden, so the user only sees the text value, but the numeric value is the bound column, so it is what's saved in related tables. For a report, you use a query that includes both tables, joined on the numeric field. That enables you to include the text field in the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    tipopilotas is offline Novice
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    5
    Ok, so I must be lost somewhere. So here is how I have it setup.

    1 Table Listed as Order Transactions
    1 Table Listed as Company
    1 Table Listed as Product Types

    In that order transaction table it is grabbing information from the company table and the product types table using lookup wizard.

    I then have a query called Order Transaction Query that basically is just a duplicate of the Order transaction table but it is a query.

    I then create the report to come from the Order Transaction Query.

    When in the design view for the report I have to change the company and product type ones to combo box and do a select statement to grab from the table for the respective area. However I still get the ID and not the actual name.

    What am I missing?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Create a new query that has all 3 tables in it. If join lines don't appear between the key fields, add them by clicking and dragging. Double click on the fields in the orders table that you want in the report, causing them to appear in the field grid below. Also add the descriptive text fields from the other two tables. Base a report on this query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    kayakismet is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    4
    Hi! Kaya, a longtime lurker here for the same issue. So I found this solution for it on another forum:

    "I am trying to generate a report from information stored in table#1
    that looks up organization names from table#2. When I include the
    organization field from table#1 in my report, the report displays the
    numerical value stored in table #1 not the actual text of the
    organization name stored in table#2. How do I get the report to
    display the text value from table #2? I'm just getting started with
    access and tried finding this in a book I have and on the help topics
    but to no avail. Any help would be greatly appreciated. Thanks.

    You can use a combobox with the following rowsource:

    SELECT OrgID, OrgName FROM table2, ORDER BY OrgName

    Then set the ColumnWidths property of that combo to the following value:
    0 cm, 3 cm

    Comboboxes are displayed as textboxes onto reports, and with the "0 cm" column
    you are hiding the value and showing the second column, the name.


    And it almost works. Problem now is that it's just displaying the wrong name, not the one that's linked. Is this a bad track to go down? It seems to be SO CLOSE to working!

  10. #10
    kayakismet is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    4

    Got it!

    This solution DOES work...I had to strip the "ORDER BY" clause, and change the column count to 2. Hallelujah! Try it and see if it works!

  11. #11
    jmitchelldueck is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    51
    Hi, I followed the process you described to build a query and it seems to work for me (although bugs usually abound for me - only time will tell!). Can you explain why? I think I have a general understanding, the lookup field looks at the reference table and picks corresponding values to the reference table's primary key, which is why it displays the number in the report. How can the query select the correct text values?

    Thanks.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    That's the whole idea behind relational database - join tables on primary and foreign key fields so all related data will be available.

    If you have a specific issue, start your own thread.
    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.

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

Similar Threads

  1. Report showing duplicate record
    By cwwaicw311 in forum Reports
    Replies: 13
    Last Post: 04-07-2010, 04:00 AM
  2. Replies: 1
    Last Post: 03-19-2010, 05:17 PM
  3. Showing Search In Report
    By Computer202 in forum Reports
    Replies: 1
    Last Post: 03-06-2010, 05:48 AM
  4. Replies: 3
    Last Post: 09-29-2009, 07:08 AM
  5. Replies: 2
    Last Post: 04-29-2009, 11:50 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