Grandchester
Registered User.
- Local time
- Today, 18:56
- Joined
- Jan 26, 2001
- Messages
- 20
I have a page that is filtered by applying a SQL statement to the RecordSource of the page. I want to query that recordsource again with a different variable (essentially using two variables to limit the search).
I was thinking the following:
If varSearch2 = "prod" Then
Me.RecordSource = "SELECT'" & RcdSc & "'.ProductCode, tblMain.Name, tblMain.[NLGI Grade], tblMain.Approvals, tblMain.[End Use] FROM tblMain WHERE (((tblMain.ProductCode)='" & varSearchData1 & "'));"
Where "prod" is the variable, and "RcdSc" is the RecordSource. Any ideas? Thanks!
I was thinking the following:
If varSearch2 = "prod" Then
Me.RecordSource = "SELECT'" & RcdSc & "'.ProductCode, tblMain.Name, tblMain.[NLGI Grade], tblMain.Approvals, tblMain.[End Use] FROM tblMain WHERE (((tblMain.ProductCode)='" & varSearchData1 & "'));"
Where "prod" is the variable, and "RcdSc" is the RecordSource. Any ideas? Thanks!