P
Paul
Let me start by saying I'm new to the programming aspect of Access. What I
would like to do is basically filter the view of records off of Radio
Buttons in the form footer. My thinking is that with Queries already
created, I could use Select Case to change the RecordSource property based
on with option is selected.
The code I've come up with is below. I keep getting an invalid use of
property compile error. Looking in help, all I can surmise is that the
RecordSource property is read-only.
Private Sub SelectView_AfterUpdate()
On Error GoTo SelectView_AfterUpdateErr
Select Case [SelectView]
Case 1
Set Forms![Member Form].RecordSource = "Member Query"
Case 2
Set Forms![Member Form].RecordSource = "Member Query (Board)"
Case 3
Set Forms![Member Form].RecordSource = "Member Query
(Volunteer)"
Case 4
Set Forms![Member Form].RecordSource = "Member Query (Vendor)"
End Select
Exit_SelectView_AfterUpdate
End Sub
SelectView_AfterUpdateErr
MsgBox Err.Description
Resume Exit_SelectView_AfterUpdate
End Sub
What is the best way to get this working??? Any help is greatly
appreciated.
Paul
would like to do is basically filter the view of records off of Radio
Buttons in the form footer. My thinking is that with Queries already
created, I could use Select Case to change the RecordSource property based
on with option is selected.
The code I've come up with is below. I keep getting an invalid use of
property compile error. Looking in help, all I can surmise is that the
RecordSource property is read-only.
Private Sub SelectView_AfterUpdate()
On Error GoTo SelectView_AfterUpdateErr
Select Case [SelectView]
Case 1
Set Forms![Member Form].RecordSource = "Member Query"
Case 2
Set Forms![Member Form].RecordSource = "Member Query (Board)"
Case 3
Set Forms![Member Form].RecordSource = "Member Query
(Volunteer)"
Case 4
Set Forms![Member Form].RecordSource = "Member Query (Vendor)"
End Select
Exit_SelectView_AfterUpdate
End Sub
SelectView_AfterUpdateErr
MsgBox Err.Description
Resume Exit_SelectView_AfterUpdate
End Sub
What is the best way to get this working??? Any help is greatly
appreciated.
Paul