F
FSHOTT
I am trying to understand how to reference (identify) a variable from a
recordset within a VBA module to a Report Select Statement Where clause. The
VBA module is to loop through an EmailInfo table (Recordset), establish an
Outlook message and attach a Supplier Report for each individual Supplier ID.
The Supplier Report is based on a supplier performance query (tables of
suppliers & their performance for all recorded years). In the Supplier Report
the Select Where clause uses variables cboYear, cboMonth & SupplierID to
filter the query data for the report. My problem is that in my tests I assign
the cboYear , cboMonth to a specific year, month and the supplier ID I get
from the recordset (eMailInfo table) but am not able to correctly identify
these variables in the Select Statement. If there a syntax such as
ModuleName!VariableName I should be using?
recordset within a VBA module to a Report Select Statement Where clause. The
VBA module is to loop through an EmailInfo table (Recordset), establish an
Outlook message and attach a Supplier Report for each individual Supplier ID.
The Supplier Report is based on a supplier performance query (tables of
suppliers & their performance for all recorded years). In the Supplier Report
the Select Where clause uses variables cboYear, cboMonth & SupplierID to
filter the query data for the report. My problem is that in my tests I assign
the cboYear , cboMonth to a specific year, month and the supplier ID I get
from the recordset (eMailInfo table) but am not able to correctly identify
these variables in the Select Statement. If there a syntax such as
ModuleName!VariableName I should be using?