Groundrush
Registered User.
- Local time
- Today, 06:42
- Joined
- Apr 14, 2002
- Messages
- 1,376
What am I doing wrong?
Hi Mile-O-Phile
Could you please tell me what I am doing wrong
I have based your example on one of my tables and have changed the table name to "Sub-Contractor Orders" and the field name to "Order Raised By"
Private Sub cmdSearch_Click()
If IsNull(Me.txtFilter) Then
MsgBox "You have not entered any filter criteria.", vbExclamation, "Filter Example"
Exit Sub
End If
With lstResults
.RowSource = "SELECT * FROM Sub-Contractor Orders WHERE [Order Raised By] Like '" & _
IIf(chkExactMatch = True, Me.txtFilter & "';", "*" & Me.txtFilter & "*';")
.Requery
End With
lblResults.Caption = "Filter Results: " & IIf(lstResults.ListCount - 1 = -1, 0, lstResults.ListCount - 1)
End Sub
The screen goes blank when I click on the search button
I know it will be something really stupid.
Thanks for your help
Hi Mile-O-Phile
Could you please tell me what I am doing wrong
I have based your example on one of my tables and have changed the table name to "Sub-Contractor Orders" and the field name to "Order Raised By"
Private Sub cmdSearch_Click()
If IsNull(Me.txtFilter) Then
MsgBox "You have not entered any filter criteria.", vbExclamation, "Filter Example"
Exit Sub
End If
With lstResults
.RowSource = "SELECT * FROM Sub-Contractor Orders WHERE [Order Raised By] Like '" & _
IIf(chkExactMatch = True, Me.txtFilter & "';", "*" & Me.txtFilter & "*';")
.Requery
End With
lblResults.Caption = "Filter Results: " & IIf(lstResults.ListCount - 1 = -1, 0, lstResults.ListCount - 1)
End Sub
The screen goes blank when I click on the search button
I know it will be something really stupid.
Thanks for your help