I have one option group on my form and I would like to add another. The form is based of a query. I want the user to be able to select either "Open", "Closed" or view "Both" from the first option group. The second option group the user would select either "Warranty", "Billable" or "Both".
The first option group worked just fine, but then I decided to add a second option group "FraInType" and thats where I ran into problems.
What am I doing wrong here.
[blue]
Private Function BuildWhereString() As String
Dim strWhere As String
Dim varItemSel As Variant
On Error Resume Next
strWhere = ""
Select Case Me.fraInStatus.Value
Case 1 '
strWhere = strWhere & "Status = 'Open'"
Case 2 '
strWhere = strWhere & "Status<>'Open'"
Case Else '
End Select
End With
Select Case Me.fraInType.Value
Case 1
strWhere = strWhere & "Warranty1 = 'Warranty'"
Case 2
strWhere = strWhere & "Warranty1<>'Warranty'"
Case Else
BuildWhereString = strWhere
Exit Function
End Function[/blue]
The first option group worked just fine, but then I decided to add a second option group "FraInType" and thats where I ran into problems.
What am I doing wrong here.
[blue]
Private Function BuildWhereString() As String
Dim strWhere As String
Dim varItemSel As Variant
On Error Resume Next
strWhere = ""
Select Case Me.fraInStatus.Value
Case 1 '
strWhere = strWhere & "Status = 'Open'"
Case 2 '
strWhere = strWhere & "Status<>'Open'"
Case Else '
End Select
End With
Select Case Me.fraInType.Value
Case 1
strWhere = strWhere & "Warranty1 = 'Warranty'"
Case 2
strWhere = strWhere & "Warranty1<>'Warranty'"
Case Else
BuildWhereString = strWhere
Exit Function
End Function[/blue]