To save on the amount of SQL statements I require to write for recordsets. I have stored all the queries that I am using as generic parameter queries all having reference to an unbound form with text boxes for the their parameters.(frmParam) controls txtParam1, 2, 3 etc
This form is open all the time and hidden.
I use a public function to set the text boxes to the parameter values on frmParam prior to opening a recordset and then use an ADODB cmd and a for each loop to set the parameters for the query prior to opening the recordset.
This all works very well but does seem a bit inefficient. It would seem better to me if I could just use VB variables to set the parameters but I cannot find any way of referencing VB variables through the QBE / SQL Application window, does anyone know how to do this?
Regards
Jon
This form is open all the time and hidden.
I use a public function to set the text boxes to the parameter values on frmParam prior to opening a recordset and then use an ADODB cmd and a for each loop to set the parameters for the query prior to opening the recordset.
This all works very well but does seem a bit inefficient. It would seem better to me if I could just use VB variables to set the parameters but I cannot find any way of referencing VB variables through the QBE / SQL Application window, does anyone know how to do this?
Regards
Jon