Hi everyone
Im not sure whether i should post my question here in the form forum or in the report,anyway im using a form to act as a search page, where a user would be able to type a Company Name in a text box then they would have to click a button which would open a report showing only the Company's information that you searched on i used the following code but i keep getting all the Companies that are in the database, Any ideas on how i could rectify this problem ?
Im not sure whether i should post my question here in the form forum or in the report,anyway im using a form to act as a search page, where a user would be able to type a Company Name in a text box then they would have to click a button which would open a report showing only the Company's information that you searched on i used the following code but i keep getting all the Companies that are in the database, Any ideas on how i could rectify this problem ?
Code:
Dim pstrCriteria As String
If IsNull([txtSearch]) Then
MsgBox " Please enter search criteria"
Else
'If legal Company Name entered, form criteria, and print
If txtSearch <> " " Then
strCriteria = txtSearch
DoCmd.OpenReport "rptIndivdualSearch", acViewPreview, , pstrCriteria
End If
End If