I have an unbound form with several controls that I use as criteria for making a custom user query. I would like each combination of options to allow me to assemble an sql statement, then use that to open up a recordset and set the object source of a subform to that recordset. My only problem is I am having a tough time making a subform based on a variable recordset, or sql that I create as a string.
I have been able to leave the subform unbound and use a variable (and a little function) to vary the subform source - but that means I have to create a seperate subform for each query I could possibly have (and create a corresponding query as well). That would clearly work but it seems so 'brute force-ish' if you know what I mean.
Any suggestions?
I have been able to leave the subform unbound and use a variable (and a little function) to vary the subform source - but that means I have to create a seperate subform for each query I could possibly have (and create a corresponding query as well). That would clearly work but it seems so 'brute force-ish' if you know what I mean.
Any suggestions?