Opening a query with code

CCIDBMNG

Registered User.
Local time
Today, 07:38
Joined
Jan 25, 2002
Messages
154
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.
 
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.
 

Users who are viewing this thread

Back
Top Bottom