DonkeyKong
Registered User.
- Local time
- Today, 07:22
- Joined
- Jan 24, 2013
- Messages
- 61
Hey guys. I am new to this forum as of 5 min ago. I have recently begun taking some database classes and have become interested in Access. I have a little bit of programming experience in VBA using Excel. This is, obviously, not Excel!
What I need to know is how to use a button on a Form to filter data in a Table. Here's what I've got. I know it's not much, but I've been searching all over and cannot seem to find squat. Thanks!
I have the button setup and working, but it's the coding or linking of the table with the button or something? So far, I have not seen any effect from the clicking of the button.
Option Explicit
Private Sub cmdMacro_Click()
Me.Filter = "Account= 'CPTSUS'"
Me.FilterOn = True
End Sub
I have linked my table using the Data => Reference stuff in Form properties.
What I need to know is how to use a button on a Form to filter data in a Table. Here's what I've got. I know it's not much, but I've been searching all over and cannot seem to find squat. Thanks!
I have the button setup and working, but it's the coding or linking of the table with the button or something? So far, I have not seen any effect from the clicking of the button.
Option Explicit
Private Sub cmdMacro_Click()
Me.Filter = "Account= 'CPTSUS'"
Me.FilterOn = True
End Sub
I have linked my table using the Data => Reference stuff in Form properties.