Les Isaacs
Registered User.
- Local time
- Today, 21:41
- Joined
- May 6, 2008
- Messages
- 186
Hi All
I need to apply a dataset (created in a vba sub) as a filter for a form. The normal recordsource for the form is a query ([qry_practices]), and until now the filter was applied as another query ([qry_eoys_to_do]) - so I had:
That was all fine, but now I need to provide for more complex options for the filter, which I can do very well with a sub that uses various Inputbox options followed by a Case statement to creates a recordset (called rsHMRCbatch) which I then need to apply as a filter - so something like:
... but of course that doesn't work 
I'm sure it's just a syntax issue ... and hope someone can help
Thanks in advance
Les
I need to apply a dataset (created in a vba sub) as a filter for a form. The normal recordsource for the form is a query ([qry_practices]), and until now the filter was applied as another query ([qry_eoys_to_do]) - so I had:
Code:
Me.RecordSource = "SELECT * FROM [qry practices] WHERE [prac name] in (SELECT [prac Name] FROM [qry_eoys_to_do])"
Code:
Me.RecordSource = "SELECT * FROM [qry_practices] WHERE [prac name] in (SELECT [prac Name] FROM [rsHMRCbatch])"
I'm sure it's just a syntax issue ... and hope someone can help
Thanks in advance
Les