Results 1 to 5 of 5
  1. #1
    Daryl2106 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    167

    Displaying primary key not text

    Hi,



    I am a new Access user. The problem I am having is getting the data in a subform to display the text associated with the primary key rather than the primary key itself. In the subform StudentEnrolmentTable, faculty choose the CourseNumber from a combo box and the remianing associated fields are populated with and update querry. The problem is when the associated fields are viewed by faculy through the form, they are showing only primary keys and not the text the key is associated with.

    Take care,

    Daryl

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    You should not be saving the associated fields data. Basic principle of relational database is to not duplicate data. If you want to display the information in the form then include the source table in the form's RecordSource by a query that joins the related tables. The jointype would be 'Show all records from StudentEnrolmentTable...' Then bind textboxes to the associated fields from the source table and set their properties as Locked Yes and TabStop No.

    RuralGuy, that link isn't working for me.
    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
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by June7 View Post
    RuralGuy, that link isn't working for me.
    Hmm...It works for me. They just changed their URL.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Okay, now it works! Yes, I never set Lookups in tables. Drives me nuts when I have to work with db's that have. When I go to a table I want to see the real value.
    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. Displaying multiple text values in crosstab query
    By MFlood7356 in forum Queries
    Replies: 6
    Last Post: 06-28-2011, 11:30 AM
  2. Replies: 4
    Last Post: 03-20-2011, 08:45 PM
  3. Replies: 1
    Last Post: 02-04-2011, 04:58 AM
  4. Replies: 2
    Last Post: 09-16-2010, 06:12 AM
  5. Are text primary keys less efficient than autonumbers?
    By bar tomas in forum Database Design
    Replies: 4
    Last Post: 05-11-2009, 09:37 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