1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
|
strSQL = "PARAMETERS [MTH] Integer;" & _
"SELECT [Cost Sector ID], [Cost Function ID], ProgrammeID, ProgrammeName as [Programme Name], " & _
"SubProgrammeName as [Sub-Programme Name], ProjectName as [Project Name], " & _
"CostTypeName as [Cost Type Name], [Manpower Direct Cost Flag], " & _
"BAF_JAN, BUS_JAN, BAF_FEB, BUS_FEB, BAF_MAR, BUS_MAR, BAF_APR, BUS_APR, BAF_MAY, BUS_MAY, " & _
"BAF_JUN, BUS_JUN, BAF_JUL, BUS_JUL, BAF_AUG, BUS_AUG, BAF_SEP, BUS_SEP, BAF_OCT, BUS_OCT, " & _
"BAF_NOV, BUS_NOV, BAF_DEC, BUS_DEC, BAF_TOT, BUS_TOT " & _
"FROM q_s_CostReport_BAFTA " & _
"UNION " & _
"SELECT [Cost Sector ID], [Cost Function ID], ProgrammeID, ProgrammeName as [Programme Name], " & _
"SubProgrammeName as [Sub-Programme Name], ProjectName as [Project Name], " & _
"CostTypeName as [Cost Type Name], [Manpower Direct Cost Flag], " & _
"BAF_JAN, BUS_JAN, BAF_FEB, BUS_FEB, BAF_MAR, BUS_MAR, BAF_APR, BUS_APR, BAF_MAY, BUS_MAY, " & _
"BAF_JUN, BUS_JUN, BAF_JUL, BUS_JUL, BAF_AUG, BUS_AUG, BAF_SEP, BUS_SEP, BAF_OCT, BUS_OCT, " & _
"BAF_NOV, BUS_NOV, BAF_DEC, BUS_DEC, BAF_TOT, BUS_TOT " & _
"FROM q_s_CostReport_HRI;"
Set qDef = dbs.CreateQueryDef("q_CostSummary", strSQL)
qDef.Parameters("MTH") = cboMonth
|