[CompanyName] and [MthFwd]. I am working with Access 2003 in Win XP. I have Microsoft DAO 3.6 in the references. Thanks in advance for any help.
My code is:
Expand|Select|Wrap|Line Numbers
- Dim qdf as DAO.Querydef
- Dim Rst as DAO.Recordset
- Dim Dbs as DAO.Database
- Dim sMthFwd, sCompanyName as String
- sCompanyName = ([Forms]![ViewIndents by Store]![CompanyName])
- sMthFwd = [Forms]![ViewIndents by Store]![IndentOrdDetails Subform]![MthFwd]
- set Dbs = CurrentDb()
- Set qdf = Dbs.QueryDefs("qryIndentOrdersForEmailing")
- qdf.Parameters![CustomerName] = sCompanyName
- qdf.Parameters![MthFwd] = sMthFwd
- Set Rst = qdf.OpenRecordset()
Item not found in this collection
I have tried all kinds of variations in code but no joy so far.
LSteve (L = Learner)