|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
error runsql command
Can anybody help me with my problem.I have a sql statement error. This is the statement causing the problem
TRANSFORM sum([tblTempSelectie].[AANTAL]) AS AANTAL SELECT [tblTempSelectie].[NED_NAAM] FROM tblTempSelectie GROUP BY [tblTempSelectie].[NED_NAAM] PIVOT [tblTempSelectie].[TEL_NR]; I know many of you think I am posting on the wrong board, but I assure you I am not. The statement it self is ok, meaning it works, but when i use it in vb i get an error. This how I'm using it : qry = TRANSFORM sum([tblTempSelectie].[AANTAL]) AS AANTAL SELECT [tblTempSelectie].[NED_NAAM] FROM tblTempSelectie GROUP BY [tblTempSelectie].[NED_NAAM] PIVOT [tblTempSelectie].[TEL_NR]; docmd.runsql qry and this is the error : An runsql action requires an argument consisting of an sql statement. How come??? The statement is a valid sql statement.
__________________
|
|
#2
|
|||
|
|||
|
If you posted your exact code, you need to quote the sql text when you build it into the qry variable, and you will need to concatenate each line since you have more than one line of text for the sql.
PHP Code:
|
|
#3
|
|||
|
|||
|
error runsql command
Sorry my fault, you may hit me. The code is already between quotes and it is one line. I 've used the docmd.runsql a couple of times, but using this sql statement gave me the problem. If I'm not wrong the syntax is ok.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > error runsql command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|