Parameter Queries

jon_sg

Registered User.
Local time
Tomorrow, 04:50
Joined
Oct 5, 2003
Messages
41
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
 
Jon

There are a few really good tutorials on querys here...
SQL
There is a tutorial specificly for perameter querys here..
Perameter querys

Good Luck
Tom
 

Users who are viewing this thread

Back
Top Bottom