B
Bill Cart
This is probally a stupid error but I can't seem to find it. As far as I can
tell the code is just like in the books but I get this
Error 13 Type Mismatch o the last line shown here. I can't see what is
causing it, the query is:
"QryMowClients"
PARAMETERS StartDate DateTime, EndDate DateTime;
SELECT MowAR.CLIENTNO, MowAR.LASTNAME, MowAR.FIRSTNAME,
Sum(MowAR.TOTALMEALS) AS MealTotal
FROM MowAR
WHERE (((MowAR.DATE)>[StartDate] And (MowAR.DATE)<[EndDate]))
GROUP BY MowAR.CLIENTNO, MowAR.LASTNAME, MowAR.FIRSTNAME
ORDER BY MowAR.LASTNAME, MowAR.FIRSTNAME;
Private Sub CmdDoConvert_Click()
Dim rst As Recordset
Dim qdf As QueryDef
Dim db As Database
Set db = CurrentDb
Set qdf = db.QueryDefs("QryMowClients")
qdf.Parameters("StartDate") = Forms![MainForm]![TxStartDate]
qdf.Parameters("EndDate") = Forms![MainForm]![TxEndDate]
MsgBox qdf.Parameters("StartDate"), vbOKOnly, "Test"
Set rst = qdf.OpenRecordset(dbOpenSnapshot, dbForwardOnly)
tell the code is just like in the books but I get this
Error 13 Type Mismatch o the last line shown here. I can't see what is
causing it, the query is:
"QryMowClients"
PARAMETERS StartDate DateTime, EndDate DateTime;
SELECT MowAR.CLIENTNO, MowAR.LASTNAME, MowAR.FIRSTNAME,
Sum(MowAR.TOTALMEALS) AS MealTotal
FROM MowAR
WHERE (((MowAR.DATE)>[StartDate] And (MowAR.DATE)<[EndDate]))
GROUP BY MowAR.CLIENTNO, MowAR.LASTNAME, MowAR.FIRSTNAME
ORDER BY MowAR.LASTNAME, MowAR.FIRSTNAME;
Private Sub CmdDoConvert_Click()
Dim rst As Recordset
Dim qdf As QueryDef
Dim db As Database
Set db = CurrentDb
Set qdf = db.QueryDefs("QryMowClients")
qdf.Parameters("StartDate") = Forms![MainForm]![TxStartDate]
qdf.Parameters("EndDate") = Forms![MainForm]![TxEndDate]
MsgBox qdf.Parameters("StartDate"), vbOKOnly, "Test"
Set rst = qdf.OpenRecordset(dbOpenSnapshot, dbForwardOnly)