Hi,
I'm having problems with a form where i have a combobox that's filled with
data from a textfield.
So this is the code i use for the combobox after_update event:
Dim strsql As String
strsql = "TRANSFORM Sum([CountOfMACHINE]) AS [SumOfCountOfMACHINE] SELECT
[MACHINE] FROM " _
& "[q_aantal machines_pe_afdeling] GROUP BY [MACHINE] PIVOT
[AFDELING] " _
& "HAVING ((tblAFDELING.AFDELING=""" & CStr(Me.Combo22.Text)
& """
);"
Debug.Print strsql
Me.Graph29.RowSource = strsql
Me.Graph29.Requery
And this is the debug output:
TRANSFORM Sum([CountOfMACHINE]) AS [SumOfCountOfMACHINE] SELECT [MACHINE]
FROM [q_aantal machines_pe_afdeling] GROUP BY [MACHINE] PIVOT [AFDELING]
HAVING ((tblAFDELING.AFDELING="Zinkroom"
);
The comobox value is correct but I get this error:
Syntax error (missing operator) in query expression '[AFDELING] HAVING
(((tblAFDELING.AFDELING) = "Zinkroom"
)'.
What syntax error do I have?
I'm having problems with a form where i have a combobox that's filled with
data from a textfield.
So this is the code i use for the combobox after_update event:
Dim strsql As String
strsql = "TRANSFORM Sum([CountOfMACHINE]) AS [SumOfCountOfMACHINE] SELECT
[MACHINE] FROM " _
& "[q_aantal machines_pe_afdeling] GROUP BY [MACHINE] PIVOT
[AFDELING] " _
& "HAVING ((tblAFDELING.AFDELING=""" & CStr(Me.Combo22.Text)
& """
Debug.Print strsql
Me.Graph29.RowSource = strsql
Me.Graph29.Requery
And this is the debug output:
TRANSFORM Sum([CountOfMACHINE]) AS [SumOfCountOfMACHINE] SELECT [MACHINE]
FROM [q_aantal machines_pe_afdeling] GROUP BY [MACHINE] PIVOT [AFDELING]
HAVING ((tblAFDELING.AFDELING="Zinkroom"
The comobox value is correct but I get this error:
Syntax error (missing operator) in query expression '[AFDELING] HAVING
(((tblAFDELING.AFDELING) = "Zinkroom"
What syntax error do I have?