klynch0803
Registered User.
- Local time
- Today, 15:31
- Joined
- Jan 25, 2008
- Messages
- 102
I have this code on a form that i enter a "WeekStart" date in a text box and a "WeekEnd" Date that looks at table tdatPurchases on change. I'm trying to get it to place the results of the sum of chkAmt in the table in the text box "GrossPurchases"
I get an error:
Runtime Error 3061
To Few Paremitors. Expected 2.
I get an error:
Runtime Error 3061
To Few Paremitors. Expected 2.
Code:
Dim dbs As DAO.Database
Dim rstPurchase As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT SUM(ChkAmt) AS GrossPurchase FROM tdatPurchases WHERE ChkDate BETWEEN fdatPayEmp!WeekStart AND fdatPayEmp!WeekEnd")