G
Guest
Hello Everyone
I'm requesting help on creating a recordset that contains specific records. Once I have the records, I want to look at a specific field in a record and then look at the previous record and grab a value. I then want to go back to the original record and place that value in a field (write it to the record). I have some code I think might work, but I get an error when I run the code. The error tells me that I am missing a parameter-- and for the life of me, I can't figure out what I'm missin
Any help would be greatly appreciated
My code is as follows
Dim dbReadings As DAO.Databas
Dim rstReadings As DAO.Recordse
Dim strSQL As Strin
Dim strSerial As Strin
Dim strEquipment As Strin
Dim PrevNum As Integer, x As Intege
Dim CurNum As Intege
('used just to try different types of OpenRecordset items
strEquipment = Forms![frmEquipmentReadings]![EquipmentID
strSQL = "SELECT * From tblMeterReadings WHERE [EquipmentID] =""" & Forms![frmEquipmentReadings]![EquipmentID]"""
Set dbReadings = CurrentDb(
Set rstReadings = dbReadings.OpenRecordset(strSQL) ---It's at this point that I get an error message "Too Few Parameters, Expect 1". I've tried using all of the openrecordset options to no avail
If someone could help me out here I'd really appreciate it.
Respectfully in your debt
Karen O.
I'm requesting help on creating a recordset that contains specific records. Once I have the records, I want to look at a specific field in a record and then look at the previous record and grab a value. I then want to go back to the original record and place that value in a field (write it to the record). I have some code I think might work, but I get an error when I run the code. The error tells me that I am missing a parameter-- and for the life of me, I can't figure out what I'm missin
Any help would be greatly appreciated
My code is as follows
Dim dbReadings As DAO.Databas
Dim rstReadings As DAO.Recordse
Dim strSQL As Strin
Dim strSerial As Strin
Dim strEquipment As Strin
Dim PrevNum As Integer, x As Intege
Dim CurNum As Intege
('used just to try different types of OpenRecordset items
strEquipment = Forms![frmEquipmentReadings]![EquipmentID
strSQL = "SELECT * From tblMeterReadings WHERE [EquipmentID] =""" & Forms![frmEquipmentReadings]![EquipmentID]"""
Set dbReadings = CurrentDb(
Set rstReadings = dbReadings.OpenRecordset(strSQL) ---It's at this point that I get an error message "Too Few Parameters, Expect 1". I've tried using all of the openrecordset options to no avail
If someone could help me out here I'd really appreciate it.
Respectfully in your debt
Karen O.