Question Filtering a subform

Core

Registered User.
Local time
Today, 08:30
Joined
May 27, 2008
Messages
79
Hello,

I have a sub form which contains test results: Test Date, Test Result, Module, etc ect.

on the main form I have a Radio frame with 3 options: "All tests, Passed, Failed"

I want to filter sub form based on the option selected. all tests will show all, passed will show those with a result >0.74 and failed <0.75

I based the sub form on a query and linked the criteria of the Test Result to a text box on the main form. VBA code passed "*", ">0.74", "<0.75" to the value of the text box based on the option selected...

That didn't work anywayz,

Any idea's?

Many thanks,
 
Okay I solved this, what I did:

I created 3 queries with all the fields on the sub form.

Each having the correct criteria on the test score field: >0.74, <0.75 etc

then on the after_update event on the option frame I switched the recordsource between the queries and then requeried, works fine.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom