I do not know what is wrong with my code and thought I needed a different set of eyes. When I run this code, it opens up the form, but filters to show a blank record instead of the matching record. I'm guessing, for some reason, what I'm searching for doesn't match anything in my records. Any ideas?
I've also tried to no avail:
[Customer_Name] is a Text field
Thanks in advance
Code:
Private Sub CmdSearch_Click()
Dim strDoc As String
Dim strWhere As String
strDoc = "frm_Main_Cust_Data"
strWhere = "forms!frm_Main_Cust_Data![Customer_Name] like ""*" & Me!
[cust_#] & "*"""
DoCmd.OpenForm strDoc, acNormal, , strWhere
End Sub
I've also tried to no avail:
Code:
strWhere = "forms!frm_Main_Cust_Data![Customer_Name] like[COLOR=red] [B]'[/B][/COLOR]*" & Me!
[cust_#] & "*[B][COLOR=red]'[/COLOR][/B]"
[Customer_Name] is a Text field
Thanks in advance