Dear Group,
Maybe somebody can help me out with a passing parameters issue.
Here what I have….
I have a form DateRange; This form has month and year parameters for report data selection…
cmdHC.CommandText =
"select sum([IViami]) as Total from netsales
where (((IVMKPL) IN('LA', 'LB', 'LC', 'QA', 'QC', 'FA', 'FB', 'FD', 'NA', 'NB', 'NC', 'PA', 'HA', 'PB', 'PC')))
and ihyear= '" & Forms![DateRange]![Year] & "'"
And IHmonth = '" & Forms![DateRange]![Month] & "'"
And CMCUSN = " & txtCustNum"
I’m getting a syntax error….
Thanks
Maybe somebody can help me out with a passing parameters issue.
Here what I have….
I have a form DateRange; This form has month and year parameters for report data selection…
cmdHC.CommandText =
"select sum([IViami]) as Total from netsales
where (((IVMKPL) IN('LA', 'LB', 'LC', 'QA', 'QC', 'FA', 'FB', 'FD', 'NA', 'NB', 'NC', 'PA', 'HA', 'PB', 'PC')))
and ihyear= '" & Forms![DateRange]![Year] & "'"
And IHmonth = '" & Forms![DateRange]![Month] & "'"
And CMCUSN = " & txtCustNum"
I’m getting a syntax error….
Thanks