W
Wendy Parry
Hi,
I know I should be creating a stored procedure for this, but I simply
haven't got the time to do the learning...I'll do that when I've
finished this project. But a question is how do I use the following in a
VBA strSQL string:
SELECT [CountOfPU_SEQ]-[Started] AS [Not Started], test2.SET_CODE,
test2.SET_SUBJECT, test2.Started, test2.CountOfPU_SEQ, test2.SET_SEQ,
test2.SET_DEF_TEACH, test2.SET_YEAR
FROM test2
GROUP BY [CountOfPU_SEQ]-[Started], test2.SET_CODE, test2.SET_SUBJECT,
test2.Started, test2.CountOfPU_SEQ, test2.SET_SEQ, test2.SET_DEF_TEACH,
test2.SET_YEAR
HAVING (((test2.SET_SUBJECT)="it") AND ((test2.SET_DEF_TEACH)="wmp"));
The parameters in the HAVING come from combobox values on the current form.
The length of SQL string seems to create one problem I've tried breaking
it into sections and concatenating back but it returns a FALSE and then
I get another problem when trying to pick up the ComboBox values:
strSQL = strSQL & "(((test2.SET_SUBJECT)" = "'" & strSubject & "') AND
((test.2.SET_DEF_TEACH)" = "'" & strTeach & "'))"
Be most grateful for help. You guys are stars!
Wendy
I know I should be creating a stored procedure for this, but I simply
haven't got the time to do the learning...I'll do that when I've
finished this project. But a question is how do I use the following in a
VBA strSQL string:
SELECT [CountOfPU_SEQ]-[Started] AS [Not Started], test2.SET_CODE,
test2.SET_SUBJECT, test2.Started, test2.CountOfPU_SEQ, test2.SET_SEQ,
test2.SET_DEF_TEACH, test2.SET_YEAR
FROM test2
GROUP BY [CountOfPU_SEQ]-[Started], test2.SET_CODE, test2.SET_SUBJECT,
test2.Started, test2.CountOfPU_SEQ, test2.SET_SEQ, test2.SET_DEF_TEACH,
test2.SET_YEAR
HAVING (((test2.SET_SUBJECT)="it") AND ((test2.SET_DEF_TEACH)="wmp"));
The parameters in the HAVING come from combobox values on the current form.
The length of SQL string seems to create one problem I've tried breaking
it into sections and concatenating back but it returns a FALSE and then
I get another problem when trying to pick up the ComboBox values:
strSQL = strSQL & "(((test2.SET_SUBJECT)" = "'" & strSubject & "') AND
((test.2.SET_DEF_TEACH)" = "'" & strTeach & "'))"
Be most grateful for help. You guys are stars!
Wendy