R
romantercero
hi
Long Time Reader Firs time poster...
I hope some one can help me with this as I have not been able to fin
an an answer anywhere...
Ok, so I want to manipulate data on a table using various SQL queries
So I can create some temporary table and then delete them once I hav
my way with them but I thought it would be faster usin
DAO.recordsets. Generating the first one based on a table is n
proble
Dim rs1 As DAO.Recordse
Dim rs2 As DAO.Recordse
Set rs1 = CurrentDb.OpenRecordset("SELECT palletid
clave,lote,sum(pal) as pallets FROM Disponibles "
"GROUP BY palletid, clave,lote,facturacion " &
"HAVING (((Facturacion) = " & intClient
& ") AN
((Sum(disponibles.pal))>0));"
Now, generating the seccond recordset based on the first one will no
work. I get Run-Time error 3078 The MSJet DBE cannot find the inpu
table or query 'rs2'. Here's the code for that
[code:1:0a480bf3f2
Set rs2 = CurrentDb.OpenRecordset("SELECT palletid
avg(pallets) AS PalletCount FROM rs2 " &
"GROUP BY palletid;"
[/code:1:0a480bf3f2
Als
[code:1:0a480bf3f2
CantidadPallets = DSum("PalletCount"
"[rs2]"
[/code:1:0a480bf3f2
Will give me the same error. I gather that recordsets cannot be use
interchangebly with tables or queries :-
Any thoughs will be greatly apreciated
Long Time Reader Firs time poster...
I hope some one can help me with this as I have not been able to fin
an an answer anywhere...
Ok, so I want to manipulate data on a table using various SQL queries
So I can create some temporary table and then delete them once I hav
my way with them but I thought it would be faster usin
DAO.recordsets. Generating the first one based on a table is n
proble
Dim rs1 As DAO.Recordse
Dim rs2 As DAO.Recordse
Set rs1 = CurrentDb.OpenRecordset("SELECT palletid
clave,lote,sum(pal) as pallets FROM Disponibles "
"GROUP BY palletid, clave,lote,facturacion " &
"HAVING (((Facturacion) = " & intClient
& ") AN
((Sum(disponibles.pal))>0));"
Now, generating the seccond recordset based on the first one will no
work. I get Run-Time error 3078 The MSJet DBE cannot find the inpu
table or query 'rs2'. Here's the code for that
[code:1:0a480bf3f2
Set rs2 = CurrentDb.OpenRecordset("SELECT palletid
avg(pallets) AS PalletCount FROM rs2 " &
"GROUP BY palletid;"
[/code:1:0a480bf3f2
Als
[code:1:0a480bf3f2
CantidadPallets = DSum("PalletCount"
"[rs2]"
[/code:1:0a480bf3f2
Will give me the same error. I gather that recordsets cannot be use
interchangebly with tables or queries :-
Any thoughs will be greatly apreciated