Thank you both very much for your replies.
Here is what I've come up with using your input:
[CODE=vb]strSQL = "SELECT Max(EntryType) AS MaxOfEntryType " &
"FROM tblForecastData GROUP BY BusinessLine, [Packaging Location], Week " & _
"WHERE [Packaging Location]='" & 8150 & "'AND Week=" & 1[/CODE]
In the WHERE clause 8150 (text data...
User Profile
Collapse
-
I did that intentionally because the field Week is a number data type; is that the incorrect way to handle that?
When I add the single quotes around Week I receive a data type mismatch error.Leave a comment:
-
Run-time error '3075': Extra ) in query expression...
Please see code below:
[CODE=vb]strSQL = "SELECT Max(EntryType) AS MaxOfEntryType " & _
"FROM tblForecastData GROUP BY BusinessLine, [Packaging Location], Week " & _
"HAVING ((([Packaging Location])='" & xx & "') AND ((Week)=" & xx & ")) "[/CODE]
I don't understand why I am receiving the following error:
Run-time error...
No activity results to display
Show More
Leave a comment: