O
Opal
I have a form that I wish to use an option group to filter a field on
the sub-form.
I have input the following code:
Private Sub fraStatus_AfterUpdate()
If Me.fraStatus.Value = 2 Then
Me.Filter = "Status = Closed"
Me.FilterOn = True
ElseIf Me.fraStatus.Value = 1 Then
Me.Filter = "Status = Open"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
End Sub
I have also placed the following code in the subform:
Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
If ApplyType = acShowAllRecords Then
Me.fraStatus.Value = 3 'Show all records
Me.fraStatus.Enabled = True
Else
Me.fraStatus.Value = Null 'No option button selected
Me.fraStatus.Enabled = False
End If
End Sub
Every time I make a change to "open" or "closed" in the Option
group I get a pop-up stating:
"Enter Parameter Value
Status"
I cannot figure out what I am missing to get this to work...
can anyone help? I am running Access 2003. Thank you.
the sub-form.
I have input the following code:
Private Sub fraStatus_AfterUpdate()
If Me.fraStatus.Value = 2 Then
Me.Filter = "Status = Closed"
Me.FilterOn = True
ElseIf Me.fraStatus.Value = 1 Then
Me.Filter = "Status = Open"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
End Sub
I have also placed the following code in the subform:
Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
If ApplyType = acShowAllRecords Then
Me.fraStatus.Value = 3 'Show all records
Me.fraStatus.Enabled = True
Else
Me.fraStatus.Value = Null 'No option button selected
Me.fraStatus.Enabled = False
End If
End Sub
Every time I make a change to "open" or "closed" in the Option
group I get a pop-up stating:
"Enter Parameter Value
Status"
I cannot figure out what I am missing to get this to work...
can anyone help? I am running Access 2003. Thank you.