Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old February 21st, 2006, 01:55 PM
Jake
Guest
 
Posts: n/a
Default Querying for No Records?

I'm building a database of students whose hearing will be tested. I had
a main table set up of all of the student data and then a test table
linked to the main table by a student ID.

The way that the testers use the database is that while they are
testing they only enter results for students who FAIL, thus creating
records in the test table for each of those students. When they are
finished they need to enter PASS for the students who passed the
hearing test. There are thousands of students so they can't go through
and enter thousands of passes. Is there a way to run a query to find
students who don't have a record in the test table?

Any help would be amazingly appreciated.

Jake




  #2  
Old February 21st, 2006, 09:05 PM
jleckrone@hotmail.com
Guest
 
Posts: n/a
Default Re: Querying for No Records?

Your query is actually quite easy. Make a query, linking the ID Number
from each table. Now double click on the link and a Join Properties
window should open. Select the option that says "Include all records
from MainTable and only those records from TestTable where the joined
fields are equal." Make the ID field from the test table as one of
your query fields along with the other fields your want from the main
table. Put Is Null in the criteria for the Test Table ID. When you
run the query, the results should give you all students that do not
have any test results. Hope that helps!



Jake wrote:[color=blue]
> I'm building a database of students whose hearing will be tested. I had
> a main table set up of all of the student data and then a test table
> linked to the main table by a student ID.
>
> The way that the testers use the database is that while they are
> testing they only enter results for students who FAIL, thus creating
> records in the test table for each of those students. When they are
> finished they need to enter PASS for the students who passed the
> hearing test. There are thousands of students so they can't go through
> and enter thousands of passes. Is there a way to run a query to find
> students who don't have a record in the test table?
>
> Any help would be amazingly appreciated.
>
> Jake[/color]

  #3  
Old February 22nd, 2006, 03:15 PM
Jake
Guest
 
Posts: n/a
Default Re: Querying for No Records?

Perfect! This was exactly what I needed. Thank you so much.

  #4  
Old February 22nd, 2006, 04:25 PM
Jake
Guest
 
Posts: n/a
Default Re: Querying for No Records?

One more quick problem. I have created that query and it worked just
like I needed it to. I now need to update all of those found students
with a "P" for pass. When I run an update query on those students to
replace the test field with a "P" it created the correct amount of
records but instead of using the Student ID, it put a "0" in that
field.

Thoughts?

  #5  
Old February 28th, 2006, 09:05 PM
jleckrone@hotmail.com
Guest
 
Posts: n/a
Default Re: Querying for No Records?

You cannot do that with an update query because the student Id does not
exist in the Test Table, remember? Use an append query instead.
Append the StudentId from the MainTable and then the "P" for the grade.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.