J
JoeA2006
I am trying to run the following query in module that exports the data to an
Excel sheet. The module works correctly when I use the first statement with
the literal for the MONYR
sSQL = " SELECT qryConsolidatedPerp.*, qryConsolidatedPerp.LOC FROM
qryConsolidatedPerp WHERE (((qryConsolidatedPerp.EndBalMo)='AUG06'));"
When I try to pass the value from a control using this
Mnyr = Me.Text8.Value
sSQL = " SELECT qryConsolidatedPerp.*, qryConsolidatedPerp.LOC FROM
qryConsolidatedPerp WHERE qryConsolidatedPerp.EndBalMo = Mnyr"
I receive the message
"Runtime error 3061 too few parameters expected 1"
I can Debug.Print the value of Mnyr but it does not seem to get passed to
the query.
Is a syntax problem?
Excel sheet. The module works correctly when I use the first statement with
the literal for the MONYR
sSQL = " SELECT qryConsolidatedPerp.*, qryConsolidatedPerp.LOC FROM
qryConsolidatedPerp WHERE (((qryConsolidatedPerp.EndBalMo)='AUG06'));"
When I try to pass the value from a control using this
Mnyr = Me.Text8.Value
sSQL = " SELECT qryConsolidatedPerp.*, qryConsolidatedPerp.LOC FROM
qryConsolidatedPerp WHERE qryConsolidatedPerp.EndBalMo = Mnyr"
I receive the message
"Runtime error 3061 too few parameters expected 1"
I can Debug.Print the value of Mnyr but it does not seem to get passed to
the query.
Is a syntax problem?