He all,
I've been searching and playing with this for about 4 days now and I'm still feeling like a noob!
I have a form with four subforms that holds various details for my students - all working fine, now I have a tick box on my main form that shows the archived state of students - i.e. if they are still active or not. Now I need to keep all my student records, but I don't want to trawl through all the archived ones to find the live ones, and vise versa!
Is there a way to add a toggle button that will toggle between showing live ONLY and archived ONLY based on the Yes/No tick box?
I've tried all sorts of things (but, obviously NOT the right things! lol), but I'm really new to Access (1 week of using it) and so have had no luck.
Have tried:
creating a query with a filter - but can only get it to show archived ONLY or ALL.
VBA
- This would be the favourite - but whatever I put as my filter - I can only seem to do the same as above! I guess that I will need an IF/THEN/ELSE statement, but it doesn't seem to work either!
Anybody able to point me in the right direction with the VBA code, or any other method?
Thanks,
I've been searching and playing with this for about 4 days now and I'm still feeling like a noob!
I have a form with four subforms that holds various details for my students - all working fine, now I have a tick box on my main form that shows the archived state of students - i.e. if they are still active or not. Now I need to keep all my student records, but I don't want to trawl through all the archived ones to find the live ones, and vise versa!
Is there a way to add a toggle button that will toggle between showing live ONLY and archived ONLY based on the Yes/No tick box?
I've tried all sorts of things (but, obviously NOT the right things! lol), but I'm really new to Access (1 week of using it) and so have had no luck.
Have tried:
creating a query with a filter - but can only get it to show archived ONLY or ALL.
VBA
Code:
Private Sub Check66_Click()
DoCmd.ApplyFilter , "filter criteria here"
End Sub
Anybody able to point me in the right direction with the VBA code, or any other method?
Thanks,