M
meckmoralde via AccessMonster.com
Guys Please Help Me , i dont know what is wrong with my code
Private Sub Command3_Click()
Dim dbs As Database
Dim rstSchedule As Recordset
Dim strSQL As String
Set dbs = CurrentDb()
strSQL = "SELECT SaleSubDate,SaleSubStoreCde, SalesSubStyleNo,Sum
(SaleSubQty) AS SumOfSaleSubQty FROM SalesFromYolly GROUP BY SaleSubDate,
SaleSubStoreCde, SalesSubStyleNo HAVING (((SaleSubDate Between #7/27/2009#
And #7/31/2009#) AND (SaleSubStoreCde= 0011) AND ((SalesSubStyleNo)
=205112061008));"
Set rstSchedule = dbs.OpenRecordset(strSQL, dbOpenDynaset)
MsgBox rstSchedule![SumOfSaleSubQty]
Private Sub Command3_Click()
Dim dbs As Database
Dim rstSchedule As Recordset
Dim strSQL As String
Set dbs = CurrentDb()
strSQL = "SELECT SaleSubDate,SaleSubStoreCde, SalesSubStyleNo,Sum
(SaleSubQty) AS SumOfSaleSubQty FROM SalesFromYolly GROUP BY SaleSubDate,
SaleSubStoreCde, SalesSubStyleNo HAVING (((SaleSubDate Between #7/27/2009#
And #7/31/2009#) AND (SaleSubStoreCde= 0011) AND ((SalesSubStyleNo)
=205112061008));"
Set rstSchedule = dbs.OpenRecordset(strSQL, dbOpenDynaset)
MsgBox rstSchedule![SumOfSaleSubQty]