Do While Loop appropriate for my situation??

BBQ Kittens

Registered User.
Local time
Today, 08:43
Joined
Apr 22, 2011
Messages
49
Hello! First time poster but certainly not new to the forums as i have relied on everyones vast superiority in access since my knowledge is limited to say the least...

I am trying to figure out how i can solve my situation. My best guess is a Do While Loop but i have never tried one.

A simplistic view of my form is as follows:

[Test Number] [Suffix].............................[Pass/Fail]
1 ..............................................................F
1 ....................A .......................................P
2 ..............................................................P
3 ..............................................................F
What I would like is to filter out test #s that have a Pass and and display only those that do not have a passing test. So in this case test # 1 and 2 would filter out since they have an associated Pass but test # 3 would show since it does not have a Pass. The suffix just indicates all the attempts to reach a Pass and may go as high as Z or greater. Any help is very much appreciated!
 
Can you tell us about your database? The tables?

Can you get the data you want if you use a query?
 
depending how this is stored in your dbs, a simple query should suffice
 
Alright well for some reason i cant zip the file down to a size that is small enough despite removing everything but the table and form...ill try again later when my headache leaves and im thinking clearly. I probably was a bit confusing in my first post unfortunately...a simple way to explain my table is as such: Table1 contains fields for [Test Numbers], [Suffix], and [Pass/Fail]. When an individual takes a test it may pass or fail. If it fails, they must restest that location and assign it a 'Suffix'. The 'Suffix' may range from A to Z depending on how many attempts it takes to get a passing test. If an individual has a failing test, I would like to have a check to see if they in fact retested until they had a passing test and were not being sloppy. I would like to view only those tests that failed and have no associated passing retest. As of now i have a query that shows me all failing tests and all tests with a suffix, this works but unfortunately when we have over 3000 tests we generate many many pages and i rather not waste time scanning each page to see if one test was not properly retested!

if you make it through my essay here and understand me then THANKYOU!! i hope this helps a bit!
 
Alright well for some reason i cant zip the file down to a size that is small enough despite removing everything but the table and form...ill try again later when my headache leaves and im thinking clearly.

Did you remember to run COMPACT AND REPAIR first before trying to zip the file?
 
Alright well for some reason i cant zip the file down to a size that is small enough despite removing everything but the table and form...ill try again later when my headache leaves and im thinking clearly. I probably was a bit confusing in my first post unfortunately...a simple way to explain my table is as such: Table1 contains fields for [Test Numbers], [Suffix], and [Pass/Fail]. When an individual takes a test it may pass or fail. If it fails, they must restest that location and assign it a 'Suffix'. The 'Suffix' may range from A to Z depending on how many attempts it takes to get a passing test. If an individual has a failing test, I would like to have a check to see if they in fact retested until they had a passing test and were not being sloppy. I would like to view only those tests that failed and have no associated passing retest. As of now i have a query that shows me all failing tests and all tests with a suffix, this works but unfortunately when we have over 3000 tests we generate many many pages and i rather not waste time scanning each page to see if one test was not properly retested!

if you make it through my essay here and understand me then THANKYOU!! i hope this helps a bit!

i still think its a matter of constructing a query, or chain of queries to extract the data you want
 
I agree with Dave (gemma) that this is just a query problem.

Suppose you do an aggregate query that does a MAX of PassFail and also does a Min on PassFail.

Code:
SELECT TestNumber, Max(tblTest.PassFail) AS MaxPF, Min(tblTest.PassFail) AS MinPF
FROM tblTest
GROUP BY TestNumber

The result of your sample data will look like this:

#......MaxPF....MinPF
1........P...........F
2........P...........P
3........F...........F

Hopefully you can see how you can use this query result to select only F/F rows.

Chris
 
ill definately check this out! im sure you all are dead on about it being simply a query solution and i just have not thoroughly examined it :/ Thanks again!!
 
Perfect! thats exactly what i needed, Thankyou so much Stopher and everyone else who took time to respond.
 

Users who are viewing this thread

Back
Top Bottom