chellebell1689
Registered User.
- Local time
- Today, 02:21
- Joined
- Mar 23, 2015
- Messages
- 267
Hello,
I've got a form that takes the members from my members table and allows me to take attendance. I have it set up with toggle buttons in the footer (so we can see what class we're currently looking at) and I want to apply two filters when we click on a button. The two filters are "SS_Roll = Yes (or True)" and "SS_Class = AD1 (or whatever the class is)". I did some research and found one code for it, but now that I'm getting the missing object error and upon further research, I'm starting to think the code I found was only an excerpt. Below is the code I currently have. It highlights the first line when I hit debug.
*Edit*
Forgot to say, let me know if you need more information! And thanks in advance for the help. This is the first time I've done script for Access on my own (last time I watched a video on how to do something and didn't really understand what I was doing).
I've got a form that takes the members from my members table and allows me to take attendance. I have it set up with toggle buttons in the footer (so we can see what class we're currently looking at) and I want to apply two filters when we click on a button. The two filters are "SS_Roll = Yes (or True)" and "SS_Class = AD1 (or whatever the class is)". I did some research and found one code for it, but now that I'm getting the missing object error and upon further research, I'm starting to think the code I found was only an excerpt. Below is the code I currently have. It highlights the first line when I hit debug.
Code:
Private Sub OptAD1_Click()
Table![MembersTable].FilterOn = True
Table![MembersTable].Filter = "[SS_Roll] = " & True And "[SS_Class] = " & AD1
End Sub
*Edit*
Forgot to say, let me know if you need more information! And thanks in advance for the help. This is the first time I've done script for Access on my own (last time I watched a video on how to do something and didn't really understand what I was doing).
Last edited: