B
Biggles
I want to open an MPD file and insert the following query,
ssql(19) = "TRANSFORM First(MSP_TEXT_FIELDS.TEXT_VALUE) AS
FirstOfTEXT_VALUE " & _
"SELECT MSP_TEXT_FIELDS.PROJ_ID, MSP_TEXT_FIELDS.TEXT_REF_UID
" & _
"INTO tblCT_TEXT_FIELDS " & _
"From MSP_TEXT_FIELDS " & _
"GROUP BY MSP_TEXT_FIELDS.PROJ_ID,
MSP_TEXT_FIELDS.TEXT_REF_UID " & _
"PIVOT MSP_TEXT_FIELDS.TEXT_FIELD_ID "
but I am running this from Project and the following does not work:
Set AccessApp = CreateObject("access.application")
AccessApp.opencurrentdatabase proj_file
ssql(19) = "TRANSFORM First(MSP_TEXT_FIELDS.TEXT_VALUE) AS
FirstOfTEXT_VALUE " & _
"SELECT MSP_TEXT_FIELDS.PROJ_ID, MSP_TEXT_FIELDS.TEXT_REF_UID
" & _
"INTO tblCT_TEXT_FIELDS " & _
"From MSP_TEXT_FIELDS " & _
"GROUP BY MSP_TEXT_FIELDS.PROJ_ID,
MSP_TEXT_FIELDS.TEXT_REF_UID " & _
"PIVOT MSP_TEXT_FIELDS.TEXT_FIELD_ID "
AccessApp.Execute ssql(19)
'CONN_PROJ.Execute ssql(19)
AccessApp.closecurrentdatabase
The MPD file will not be created until steps above this are taken to create
the project. is there something different I should be doing, or is the above
correct and I am running into limitations in project.
ssql(19) = "TRANSFORM First(MSP_TEXT_FIELDS.TEXT_VALUE) AS
FirstOfTEXT_VALUE " & _
"SELECT MSP_TEXT_FIELDS.PROJ_ID, MSP_TEXT_FIELDS.TEXT_REF_UID
" & _
"INTO tblCT_TEXT_FIELDS " & _
"From MSP_TEXT_FIELDS " & _
"GROUP BY MSP_TEXT_FIELDS.PROJ_ID,
MSP_TEXT_FIELDS.TEXT_REF_UID " & _
"PIVOT MSP_TEXT_FIELDS.TEXT_FIELD_ID "
but I am running this from Project and the following does not work:
Set AccessApp = CreateObject("access.application")
AccessApp.opencurrentdatabase proj_file
ssql(19) = "TRANSFORM First(MSP_TEXT_FIELDS.TEXT_VALUE) AS
FirstOfTEXT_VALUE " & _
"SELECT MSP_TEXT_FIELDS.PROJ_ID, MSP_TEXT_FIELDS.TEXT_REF_UID
" & _
"INTO tblCT_TEXT_FIELDS " & _
"From MSP_TEXT_FIELDS " & _
"GROUP BY MSP_TEXT_FIELDS.PROJ_ID,
MSP_TEXT_FIELDS.TEXT_REF_UID " & _
"PIVOT MSP_TEXT_FIELDS.TEXT_FIELD_ID "
AccessApp.Execute ssql(19)
'CONN_PROJ.Execute ssql(19)
AccessApp.closecurrentdatabase
The MPD file will not be created until steps above this are taken to create
the project. is there something different I should be doing, or is the above
correct and I am running into limitations in project.