
How to Pass a Critieria Parameter from VB to Access Query?
Quote:
> My question
>is how do I pass the Acct# from VB to the query?
' declare DAO objects
dim qdf as DAO.Querydef
dim rs as DAO.Recordset
' open the query
set qdf = dbAccountingDatabase.QueryDefs("GeneralAccounts")
' set the parameter
qdf.Parameters("AccountNumber")="A12.09.09"
' recover the data
set rs = qdf.OpenRecordset(dbOpenSnapshot, dbForwardOnly)
' etc
' Hope that helps
--