So I'm going to attempt to dumb this down as much as I can

. If I have a very simple stored procedure such as:
Code:
CREATE PROCEDURE sp_GetInventory
@location varchar(10)
AS
SELECT Product, Quantity
FROM Inventory
WHERE Warehouse = @location
And assuming I use code similar to your example:
Code:
Dim dbs As DAO.Database
Dim qdf As DAO.QueryDef
Dim rst As DAO.Recordset
Dim strProcedureName As String
Dim strQueryName As String
Dim strConnection As String
Dim location as string
location = me.txtlocation
strConnection = ODBC;DRIVER=SQL Server;SERVER=SA-PHAMT\SQLEXPRESS;APP=2007 Microsoft Office system;DATABASE=ProtoDB;Trusted_Connection=Yes;
strProcedureName = "sp_GetInventory"
strQueryName = "Qry_" & ProcedureName
If DCount("*", "MSysObjects", "[Name]='" & strQueryName & "'") > 0 Then dbs.QueryDefs.Delete strQueryName
Set qdf = dbs.CreateQueryDef(strQueryName)
qdf.Connect = strConnection
qdf.SQL = strProcedureName & " ' & location & ' "
What would the query have to consist of to retrieve the Product and Quantity?