why the following VBA statement fails when I add the where part? "WHERE" & " (rsMySet.Fields(i).Name)>0"
I need to add when the field has numbers.
strSQL = "INSERT INTO TabularDepts ([Depts],
I need to add when the field has numbers.
strSQL = "INSERT INTO TabularDepts ([Depts],
Code:
, [Description], [Qty])" & _
"SELECT" & "'" & rsMySet.Fields(i).Name & "'" & " AS Dept," & _
"[PivotTblInvDepts].[Code],[PivotTblInvDepts].[Description]," & _
"[" & rsMySet.Fields(i).Name & "]" & _
"FROM PivotTblInvDepts;" & _
[U]"WHERE" & " (rsMySet.Fields(i).Name)>0"[/U]