Results 1 to 13 of 13
  1. #1
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8

    Report shows ID of field, rather than data in field

    I am working on a report and have found a problem. I have a field called "region". The data is geographical and is basically stuff like "southeast", "mid-atlantic", "southwest", etc. I reference this field in the report but the report shows the ID field of the table where this data exists, rather than the data in the "region" field. So, instead of "southeast", it shows "3". Here's a screenshot. Any tips as to what caused this to happen?


    Click image for larger version. 

Name:	report issue.png 
Views:	15 
Size:	13.8 KB 
ID:	14069

    Chris

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I suspect you are using Lookup Fields: http://access.mvps.org/access/lookupfields.htm
    Base your report on a query that joins the two tables on the Region table and then use the descriptive field instead of the ID field in the report.

  3. #3
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8
    Thanks, RuralGuy. Not sure I follow. The way it is laid out now, I am using a lookup field. I have a query that uses three fields in a table called (Service Details). The three fields are "Last/First", "Hour Performed", and "Region". The "Region" field is a lookup field that hits a field called "Region" in a table called "Regions". How would I construct a query to do what you say?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Add the Regions table to your query and use the description field instead of the ID field.

  5. #5
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8
    I did this, but the resulting report was blank and showed an error where the region ID # used to be... I assume I did something wrong.

  6. #6
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8
    If it helps, here is a copy of the database. I have to compress it to get it on here (it's over 500kb). The report in question is named "Average Hours Per Region".. It uses the only two queries in the database. The "Find Duplicates for Service Details" query identifies scholars with multiple community service records. The "Sum of hours performed by individual" query gives me a sum of all the records for each user. The report then takes that information and presents it. However, it's using the ID field of the Regions table, as you are aware.

    I appreciate the time, sir. I will happily make note of whatever you say I must do to get that report squared away:-)

    Volunteer Competition.zip

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are there no test records in this db?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Okay, I found them. Boy those Lookup Fields can really screw up a database.

  9. #9
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8
    Phew! Yeah, I'm learning lookup fields are pretty terrible. Next step for me is learning how to not use them;-)

    Thanks for looking into this!!

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Still shifting things around to make it work. Keep the faith.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is a long way from perfect but I made a few changes. I revised things so the [Average Hours...] report would use the [Copy of...] queries and tables. The [Copy of Service Details] has the relationship with the [Regions] table set up correctly and the [Region] field in the [Copy of Service Details] is no longer a Lookup Field. You can now see the intermediate queries return records for the [Copy of...] queries and hopefully this shows you how to set up the lookup's. Post back with questions where it does not make sense to you.
    Attached Files Attached Files

  12. #12
    badbox29 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    8
    Quote Originally Posted by RuralGuy View Post
    It is a long way from perfect but I made a few changes. I revised things so the [Average Hours...] report would use the [Copy of...] queries and tables. The [Copy of Service Details] has the relationship with the [Regions] table set up correctly and the [Region] field in the [Copy of Service Details] is no longer a Lookup Field. You can now see the intermediate queries return records for the [Copy of...] queries and hopefully this shows you how to set up the lookup's. Post back with questions where it does not make sense to you.
    That's perfect, thanks! I think I do see how this works a bit more clearly, now. The only thing I ran into is when I enter a new person. If only one entry exists for a region, it won't show up on the report. I changed "In (SELECT [Region] FROM [Copy of Service Details] As Tmp GROUP BY [Region] HAVING Count(*)>1 )" to "In (SELECT [Region] FROM [Copy of Service Details] As Tmp GROUP BY [Region] HAVING Count(*)>0 )" in the "Copy of find duplicates for Service Details" query and that seems to allow these entries to appear on the report. I don't see anything broken in this report from that change. Can you see where this change might cause any problems?

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by badbox29 View Post
    Can you see where this change might cause any problems?
    Not at this time. Good luck with the project.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-07-2013, 04:50 PM
  2. Lookup field shows ID # and not text
    By kelkan in forum Forms
    Replies: 3
    Last Post: 01-26-2013, 09:19 PM
  3. Text box shows ID field and not the Name
    By jzacharias in forum Access
    Replies: 5
    Last Post: 10-18-2012, 10:24 AM
  4. Add a field that shows similar reports
    By Angrybox in forum Forms
    Replies: 1
    Last Post: 04-11-2012, 01:55 PM
  5. Image Shows in Unhide Field Box
    By anoob in forum Access
    Replies: 1
    Last Post: 02-28-2011, 12:49 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