Running an SQL query in VBA...
Hi,
I'm coming from an ASP background, so maybe I'm going about this the wrong way.
I have Two forms:
In Form A, people make some selections, then I dynamically generate an SQL Query String using VBA and open up Form B, execute the String and place the resulting SUM in a Text field.
I've got everything working, except for figuring out how to call up the SQL query within VBA...! I've done some extensive Googleing, but cannot find a working answer. (I'm using Access 2003).
Should I be looking to Open Form B with my SQL query somehow, or should I open up an unbound form, run the Query in VBA (how), and then fill the text field with the correct value?
Can anyone help or point me in the right direction?
Thanx,
Augusta.
|