Hello all,
I'm a newbie in Access vba, so please help...
I have some vba code to count records, but i also need retrieve value from query SELECT SUM (......). There will be only one record (Total SUM)
and cannot find how I can do it..
Here is my vba to count records (maybe it should look similarly..) :
SQLStmt = "SELECT * FROM TEMP_backup;"
Set db = CurrentDb
Set rs = db.OpenRecordse t(SQLStmt)
If Not rs.EOF Then
rs.MoveLast
strOrder = rs.RecordCount ' (place records quantity in "strOrder")
End If
Thanks.
I'm a newbie in Access vba, so please help...
I have some vba code to count records, but i also need retrieve value from query SELECT SUM (......). There will be only one record (Total SUM)
and cannot find how I can do it..
Here is my vba to count records (maybe it should look similarly..) :
SQLStmt = "SELECT * FROM TEMP_backup;"
Set db = CurrentDb
Set rs = db.OpenRecordse t(SQLStmt)
If Not rs.EOF Then
rs.MoveLast
strOrder = rs.RecordCount ' (place records quantity in "strOrder")
End If
Thanks.
Comment