Hi,
I'm getting error 3464 while executing this code:
Sub PonerNRefsProveedores()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim sql As String
sql = "SELECT * from nrefs"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(sql)
DoCmd.RunSQL "update proveedores set nrefs=0"
While Not rst.EOF
DoCmd.RunSQL "update proveedores set nrefs=" & CDbl(rst!cuantos) & " where idproveedor='" & rst!Proveedor & "'"
rst.MoveNext
Wend
rst.Close
End Sub
The execution stops in: Set rst = dbs.OpenRecordset(sql)
I've checked the references, but they look ok (attached)
Does anyone know how can i solve this?
Thanks!
I'm getting error 3464 while executing this code:
Sub PonerNRefsProveedores()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim sql As String
sql = "SELECT * from nrefs"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(sql)
DoCmd.RunSQL "update proveedores set nrefs=0"
While Not rst.EOF
DoCmd.RunSQL "update proveedores set nrefs=" & CDbl(rst!cuantos) & " where idproveedor='" & rst!Proveedor & "'"
rst.MoveNext
Wend
rst.Close
End Sub
The execution stops in: Set rst = dbs.OpenRecordset(sql)
I've checked the references, but they look ok (attached)
Does anyone know how can i solve this?
Thanks!