M
Maracay
Hi guys
The next set of instructions are in a click event of a command button, the
first section is ok, but the second one (stWhere = stWhere & " And txtMa....)
I am getting an syntax error, I'm sure I' m missing something, I will
appreciate any help,
Thanks
Dim stWhere As String
stWhere = "dReportDate Between " & Format(txtFrom, "\#yyyy-m-d\#") & " And
" & Format(txtTo, "\#yyyy-m-d\#")
stWhere = stWhere & " And txtMachineID = #" & Me.ComboMachine & "# "
DoCmd.OpenReport "rptDetMachineOp1¬Op1", acViewPreview, _
WhereCondition:=stWhere
The next set of instructions are in a click event of a command button, the
first section is ok, but the second one (stWhere = stWhere & " And txtMa....)
I am getting an syntax error, I'm sure I' m missing something, I will
appreciate any help,
Thanks
Dim stWhere As String
stWhere = "dReportDate Between " & Format(txtFrom, "\#yyyy-m-d\#") & " And
" & Format(txtTo, "\#yyyy-m-d\#")
stWhere = stWhere & " And txtMachineID = #" & Me.ComboMachine & "# "
DoCmd.OpenReport "rptDetMachineOp1¬Op1", acViewPreview, _
WhereCondition:=stWhere