Option Explicit Public Sub GetProducts(rsAllProducts As Variant) ' ------------------------------------- ' Create the recordset ' ------------------------------------- Dim cnHome, sSQL Set cnHome = CreateObject("ADODB.Connection") cnHome.Open "MSStore" sSQL = "SELECT CategoryID, ProductPrice, ProductId, ProductName, ProductDescription, ProductPrice FROM Product" Set rsAllProducts = CreateObject("ADODB.Recordset") ' ------------------------------------- ' Set CursorLocation so recordset will become ' an ADOR recordset ' ------------------------------------- rsAllProducts.CursorLocation = adUseClientBatch rsAllProducts.Open sSQL, cnHome, adOpenForwardOnly, adLockReadOnly End Sub