I need some option group help!
- From: joann007@xxxxxxxxx
- Date: 23 Apr 2007 13:26:36 -0700
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
.
- Follow-Ups:
- Re: I need some option group help!
- From: Jeff Boyce
- Re: I need some option group help!
- Prev by Date: Re: Using combo box to search form
- Next by Date: Re: Create a Constants table in VB code
- Previous by thread: Re: Using combo box to search form
- Next by thread: Re: I need some option group help!
- Index(es):