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

    Query not returning records

    Hi Everyone,



    I'm only starting to delevelop a working knowledge of P/F keys and relationships. I am trying to fix some data problems I have in my tables through what I thought would be simple queries. I need to update the AnnualClassNumberID (StudentEnrollment T) from the AnnualClassNumbers Table. (Currently I have a CourseNumber from CourseInventory T in there). I only need to do this for students enrolled in term 1129 (the same student found in Term1129Students T).

    I've tried many queries (Query1) with no luck. Strangely there are times when I only get the enrollment records for 2 of the 83 students enrolled in term 1129.

    This probalby makes no sense, so please ask if you need clarification.

    Thanks and take care,

    Daryl
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Query1 is just a SELECT query and doesn't include all the tables you describe.

    You want to update StudentEnrollment table with ClassNumber value from AnnualClassNumbers table?

    Add a field in StudentEnrollement table for the ClassNumber.

    UPDATE AnnualClassNumbers RIGHT JOIN StudentEnrollmentTable ON AnnualClassNumbers.ID = StudentEnrollmentTable.AnnualClassNumberID SET StudentEnrollmentTable.ClassNumber = [AnnualClassNumbers]![ClassNumber];

    However, don't understand how term code 1129 is considered. AnnualClassNumbers table does not include 1129. The only term numbers are 1 and 2. 1129 is not even in the CourseInventory table.

    Table relationships don't make sense to 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.

  3. #3
    Daryl2106 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    167
    Thanks for the reply. From your comments on the use of the term code 1129, I was able to identify a better design for the table data and create the UD_Q as you suggested. Thanks so much!

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

Similar Threads

  1. Query Criteria not returning any records
    By SgtSaunders69 in forum Access
    Replies: 2
    Last Post: 12-19-2011, 07:45 PM
  2. Recordset not returning records
    By TinaCa in forum Programming
    Replies: 3
    Last Post: 08-03-2011, 09:26 AM
  3. Replies: 1
    Last Post: 05-19-2011, 10:55 PM
  4. Returning multiple records Isn't what I need
    By frobro390 in forum Queries
    Replies: 6
    Last Post: 09-21-2010, 06:24 PM
  5. Combo box returning only about 1000 records
    By cjbuechler in forum Forms
    Replies: 12
    Last Post: 06-30-2010, 08:27 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