M
m.fisher
Hi
In the code below is there a way that qryOrderHistory could be in a
separate database. If so how would i refer to it in the code.
Thanks
Dim db As DAO.Database
Dim qd As DAO.Querydef
Dim rs As DAO.Recordset
Set db = CurrentDb
Set qd = db.QueryDefs("qryOrderHistory")
qd.Parameters("prmCustNo") = lngCustNo
Set rs = qd.OpenRecordset()
If Not rs.Eof Then
.... code to populate an excel spreadsheet
In the code below is there a way that qryOrderHistory could be in a
separate database. If so how would i refer to it in the code.
Thanks
Dim db As DAO.Database
Dim qd As DAO.Querydef
Dim rs As DAO.Recordset
Set db = CurrentDb
Set qd = db.QueryDefs("qryOrderHistory")
qd.Parameters("prmCustNo") = lngCustNo
Set rs = qd.OpenRecordset()
If Not rs.Eof Then
.... code to populate an excel spreadsheet