Results 1 to 3 of 3
  1. #1
    librarian is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    3

    Report pulling record primary key instead of text

    I have a table of journal subscriptions that contains the following fields:
    • Subscription title - text
    • Subscribers - Lookup & relationship field. This pulls the autonumber primary key, first name and last name from an employee table. It only displays the first & last name of each record when viewing the dropdown box to make a selection (the primary key is just used to distinguish between records) and multiple records can be selected.


    From this table, I have two forms that pull queries - one gives the option to select a title and view all of the names of subscribers, and the other gives the option to select an individual subscriber and see all of the titles he/she subscribes to. If the forms point to their queries, all is well. The query by title displays a Subscription column with the title in it and a Subscribers column with the last names seperated by commas of all the individual subscribers. The query by individual subscribers displays a Subscription column with each title in its own row and a column titled tblSubscript that contains the last name of the individual queried (the same name over and over again in each row).



    Once I try to create a report based on these two queries, however, the areas where the last names are displayed in the queries are only showing the primary key autonumber for their corresponding records. I would like the report to display the last names as opposed to this number (or, in a really ideal situation, the first and last names), but I'm not sure where to do this. I understand that the autonumber is the defining field used to pull each record, but it doesn't really give the person viewing the report the information they need. I can't change the last name to the primary key since this is a pretty large table of subscribers and their last names won't always be unique. I realize if only the last names are displayed some may be repeated or the report's viewer may not be able to tell two identical names apart, so having first and last name would be the best case scenario, but even just having the last name shown would be good enough.

    Thank you in advance for any help!!

    PS - sorry for the terrible thread title, I didn't really think about it until I hit post and now I'm stuck with it

  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,642
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    What you describe is one reason not to use lookups at the table level. See this site for more problems table level lookups can cause.

    Do the queries you mention include the employee table? If not, you will want to add it to the queries & then you should be able to pull the names (first & last) into your report.

    oops I see Paul beat me to the punch!

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

Similar Threads

  1. Query having trouble pulling last record
    By robsworld78 in forum Queries
    Replies: 25
    Last Post: 12-18-2011, 08:32 PM
  2. Replies: 1
    Last Post: 12-05-2011, 03:26 PM
  3. Pulling up record ID instead of combo box value
    By edzigns in forum Programming
    Replies: 1
    Last Post: 04-29-2011, 08:03 AM
  4. pulling text values into FK number column
    By REBBROWN in forum Database Design
    Replies: 2
    Last Post: 08-30-2010, 05:04 PM
  5. Pulling Record Info From Sub Form
    By redlich23 in forum Forms
    Replies: 1
    Last Post: 09-02-2009, 02:10 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