J
Johnny Bright
Hi all!
I hope I didn't accidentally post this twice.
Anyway, I get a runtime error 3061 Too Few Parameters. Expected 1 when I
run the following code.
Private Sub sngSun_LostFocus()
Dim mydb As DAO.Database
Dim rs As DAO.Recordset
Set mydb = CurrentDb
Set rs = mydb.OpenRecordset("select sum(SuppTot) as TheSum " _
& "From qrySupport where bytPer = " _
& bytPer, dbOpenSnapshot)
txtPerTot = rs("TheSum")
sngMon.SetFocus
End Sub
The underlying query works fine, but for some reason isn't working in code.
Any suggestions?
Thanks! This group is really helpful!
John
I hope I didn't accidentally post this twice.
Anyway, I get a runtime error 3061 Too Few Parameters. Expected 1 when I
run the following code.
Private Sub sngSun_LostFocus()
Dim mydb As DAO.Database
Dim rs As DAO.Recordset
Set mydb = CurrentDb
Set rs = mydb.OpenRecordset("select sum(SuppTot) as TheSum " _
& "From qrySupport where bytPer = " _
& bytPer, dbOpenSnapshot)
txtPerTot = rs("TheSum")
sngMon.SetFocus
End Sub
The underlying query works fine, but for some reason isn't working in code.
Any suggestions?
Thanks! This group is really helpful!
John