Michael Maddison
michael at ddisolutions.com.au
Mon Jun 26 02:22:16 CDT 2006
David, I don't think ADO knows about saved queries. I think you need to pass the sql string as the argument. I could well be wrong... cheers Michael M -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David & Joanne Gould Sent: Monday, 26 June 2006 4:21 PM To: Access Developers discussion and problem solving Subject: [AccessD] Recordset based on query I keep thinking this should be fairly simple. I need to check through the results in a query and calculate results from them. The code I am using starts with: Dim rsPopulateQtyBoxes As Recordset Set rsPopulateQtyBoxes = New ADODB.Recordset rsPopulateQtyBoxes.ActiveConnection = CurrentProject.Connection rsPopulateQtyBoxes.Open qryHire_New_Rentals_Extend, , adOpenKeyset, adLockOptimistic, adCmdUnknown When I try to run the code I get this error message: [] Thanks in advance for any help offered David