I have this code and it works except for the Address query I think because a address has spaces in it, my statment won't work, but maybe it's somthing else.
Also I would need to search more that just there First Name. I will need to search for First and Last Name ie: Joe Blow and/or a Address ie: 1324 N. Center st
Once I see how the statement is made I think I can build it futher but right now I'm not that familar with SQL
any help would be great
VB Code:
Private Sub cmdSearch_Click() Dim Address As String Dim LastName As String If txtSearchBox = "" Then MsgBox "Please input a value" End If If Option1 = True Then Address = txtSearchBox frmCustomers.datPrimaryRS.Recordset.MoveFirst frmCustomers.datPrimaryRS.Recordset.Find "Address = '" & [Address] & "'" If Option2 = True Then FirstName = txtSearchBox frmCustomers.datPrimaryRS.Recordset.MoveFirst frmCustomers.datPrimaryRS.Recordset.Find "FirstName = '" & FirstName & "'" Unload Me End Sub




Reply With Quote