Query an existing queried recordset (1 Viewer)

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!
 

vandewi

Senior Member
Local time
Today, 13:56
Joined
Aug 3, 2001
Messages
26
Go to "Help", and look up the "RecordSetClone Property". This should get you on the right track.
 

Grandchester

Registered User.
Local time
Today, 18:56
Joined
Jan 26, 2001
Messages
20
Thanks vandewi, I'll give it a try.
 

Users who are viewing this thread

Top Bottom