J
joann007
I've revised my code and now I'm having some difficulty. I'm sure the
answer is obvious, but I just can't quite get it:
I've created a flexible search page. On this page, the user can
search for records using all of the criteria or only one criteria.
Everything works fine except for the criteria selection from an
option
group. The name of this option group is OptionGroup
and the three radio buttons given the user three different
possibilities: Option 1-Choose "open" records meaning there is no
date in the Completed field of the table.
Option 2- Choose "closed" records meaning there is a date in the
Completed field of the table.
Option 3- Choose "overdue" records by selecting those records whose
tickledates are
previous to today and the Completed field is null. Here's the code
that I wrote up. I know something s wrong with it since it's not
working, so any information would be
greatly appreciated.
'Search by radio button selection. Gets exact match of field.
If Not IsNull(Me.OptionGroup) Then
Select Case Me.OptionGroup
Case 1
strWhere = strWhere & " ([Completed] Is Null) AND
"
Case 2
strWhere = strWhere & " ([Completed] Is Not Null)
AND "
Case 3
strWhere = strWhere & " ([Completed] Is Null) AND
([Completed] < Now()))))) "
End Select
End If
answer is obvious, but I just can't quite get it:
I've created a flexible search page. On this page, the user can
search for records using all of the criteria or only one criteria.
Everything works fine except for the criteria selection from an
option
group. The name of this option group is OptionGroup
and the three radio buttons given the user three different
possibilities: Option 1-Choose "open" records meaning there is no
date in the Completed field of the table.
Option 2- Choose "closed" records meaning there is a date in the
Completed field of the table.
Option 3- Choose "overdue" records by selecting those records whose
tickledates are
previous to today and the Completed field is null. Here's the code
that I wrote up. I know something s wrong with it since it's not
working, so any information would be
greatly appreciated.
'Search by radio button selection. Gets exact match of field.
If Not IsNull(Me.OptionGroup) Then
Select Case Me.OptionGroup
Case 1
strWhere = strWhere & " ([Completed] Is Null) AND
"
Case 2
strWhere = strWhere & " ([Completed] Is Not Null)
AND "
Case 3
strWhere = strWhere & " ([Completed] Is Null) AND
([Completed] < Now()))))) "
End Select
End If