J
jonefer
I have a combo box on a form that lists 3 types of callers
1. All
2. Anonymous
3. Specific Caller (LastName, FirstName MI)
I want the form to be able to filter by the various types above.
The following code seems like it should work, but causes Access to crash
(I'm using Access XP) --Any ideas why it crashes?
Select Case Me.CallerFilterBox
Case 0 'Anonymous'
Me.Filter = "[CallerID]= " & 0
Me.FilterOn = True
Case -1 'All Callers
msgbox "All"
Me.FilterOn = False
Case Else 'Specific Caller
Me.Filter = "[CallerID] = " & Me.CallerFilterBox
Me.FilterOn = True
End Select
1. All
2. Anonymous
3. Specific Caller (LastName, FirstName MI)
I want the form to be able to filter by the various types above.
The following code seems like it should work, but causes Access to crash
(I'm using Access XP) --Any ideas why it crashes?
Select Case Me.CallerFilterBox
Case 0 'Anonymous'
Me.Filter = "[CallerID]= " & 0
Me.FilterOn = True
Case -1 'All Callers
msgbox "All"
Me.FilterOn = False
Case Else 'Specific Caller
Me.Filter = "[CallerID] = " & Me.CallerFilterBox
Me.FilterOn = True
End Select