Hi,
My Prob.
I have been trying to place a filter/search facility into one of my forms based on my tblcustomerdetails. Basically i set in my table/query was
Customer ID, Surname, Name, Tel No, Work No Cell No ( i have a number of other fields within my tblcustomerdetails). I have my filter/search set to surname but once i type in a surname and click search it goes from showing me a list of customer details with those field state above, to showing me the other fields in that table only.
How do i get around this problem? All I want is to be able to type in a specifc surname and it show me that that persons details only showing those fields stated above...
The coding i have in place is the same as that of page of this thread....
______________________________________________
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 tblCustomerDetails WHERE [Surname] 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
_______________________________________
Any help would be great and appreciated.
Necron (Newbie - Soz!!!)
