if i have a for with a sub form showing the result of search text box using vba code, and if i want to show the result of the search on report , what should i do
Code: Select all
Dim sql As String
sql = "SELECT qrySearch.* FROM qrySearch " _
& " Where FirstName Like '*" & Me.txtSearch & "*'" _
& " OR SecondName Like '*" & Me.txtSearch & "*'" _
& " OR ThirdName Like '*" & Me.txtSearch & "*'" _
& " OR FirstName_Mother Like '*" & Me.txtSearch & "*'" _
Me.sbf_SearchData.Form.RecordSource = sql
Me.sbf_SearchData.Form.Requery