J
joann007
I'm sure this is very easy, but I have no idea how to go about 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 (how creative is
that?), and the three radio buttons given the user three different
possibilities: Option 1-Choose records that are labled as "open".
Option 2- Choose records labled as "closed". Option 3- Choose
overdue records by selecting those records whose tickledates are
previous to today. Here's the code that I wrote up. I know something
is wrong with it since it's not working, so any information would be
greatly appreciated.
'Search by radio button selection, and gets exact match of field.
If no radio button is selected, than loops onto the next criteria
If Not IsNull(Me.OptionGroup) Then
Select Case Me.OptionGroup
Case 1
strWhere = strWhere & " ([Status] = Open) AND "
Case 2
strWhere = strWhere & " ([Status] = Closed) AND "
Case 3
strWhere = strWhere & " ([Status] = Open AND
([TickleDate] < Now())) "
End Select
End If
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 (how creative is
that?), and the three radio buttons given the user three different
possibilities: Option 1-Choose records that are labled as "open".
Option 2- Choose records labled as "closed". Option 3- Choose
overdue records by selecting those records whose tickledates are
previous to today. Here's the code that I wrote up. I know something
is wrong with it since it's not working, so any information would be
greatly appreciated.
'Search by radio button selection, and gets exact match of field.
If no radio button is selected, than loops onto the next criteria
If Not IsNull(Me.OptionGroup) Then
Select Case Me.OptionGroup
Case 1
strWhere = strWhere & " ([Status] = Open) AND "
Case 2
strWhere = strWhere & " ([Status] = Closed) AND "
Case 3
strWhere = strWhere & " ([Status] = Open AND
([TickleDate] < Now())) "
End Select
End If