View Full Version : Opening a query with code


CCIDBMNG
01-29-2002, 06:30 AM
I have a query that sums up totals from a table then gives me a grand total for each customer. I want to have a form with a button and when the button is clicked run the query ReservesTtl and put the grand totals into table Reserves. I know how to open a table with code but when I use that statement
set rstReserves = currentdb.openrecordset("Reserves")
set rstReservesTtl = currentdb.openrecordset("ReservesTtl")
It says that rstReservesTtl has too few parameters, Expected 1.
Could someone please help.

D B Lawson
01-29-2002, 07:25 AM
Tables aren't really designed to hold dynamic calculations. The best way is to create your calculation in a query and show it on a form - and it will update automatically whenever the grand total for a customer is updated. You don't really need to store the total in the tables because you store all the data that gives you the totals.