Sheet = "GL DOWNLOAD"
ReturnValue = SysCmd(acSysCmd SetStatus, "Getting " & Format(Facility , "000000") & " GL Data...")
datalistsql = "SELECT DISTINCTROW GLDownload_PA.O racle_Acct, GLDownload_PA.O racle_Dept, GLDownload_PA.O racle_JobCode, GLDownload_PA.A cctDesc, GLDownload_PA.D escription, tblPayrollDeptT ranslation.JobC odeDescription, Sum(GLDownload_ PA.Amount) AS SumOfAmount FROM GLDownload_PA LEFT JOIN tblPayrollDeptT ranslation ON GLDownload_PA.O racle_JobCode = tblPayrollDeptT ranslation.intJ obCodeNumber GROUP BY GLDownload_PA.O racle_Acct, GLDownload_PA.O racle_Dept, GLDownload_PA.O racle_JobCode, GLDownload_PA.A cctDesc, GLDownload_PA.D escription, tblPayrollDeptT ranslation.JobC odeDescription; "
Set DataList = MyDB.OpenRecord set(datalistsql , dbOpenSnapshot)
DataList.MoveLa st
DataList.MoveFi rst
RecordsToSend = DataList.Record Count
ReturnValue = SysCmd(acSysCmd InitMeter, "Sending" & Format(Facility , "000000") & " GL Data...", RecordsToSend)
For J = 1 To RecordsToSend
ReturnValue = SysCmd(acSysCmd UpdateMeter, J)
CostReport.Work sheets(Sheet).C ells(J, 2).Value = DataList!Oracle _Acct
CostReport.Work sheets(Sheet).C ells(J, 3).Value = DataList!Oracle _Dept
CostReport.Work sheets(Sheet).C ells(J, 4).Value = DataList!Oracle _JobCode
CostReport.Work sheets(Sheet).C ells(J, 5).Value = DataList!AcctDe sc
CostReport.Work sheets(Sheet).C ells(J, 6).Value = DataList!Descri ption
CostReport.Work sheets(Sheet).C ells(J, 7).Value = DataList!JobCod eDescription
CostReport.Work sheets(Sheet).C ells(J, 8).Value = DataList!SumOfA mount
DataList.MoveNe xt
Next J
*************** *************** *************** *********
The question is, when I finished above code but i wanna insert the heading before insert each rows.
What the next step should i code on? I stop. For example, it can display the rows value but I need the rows heading before rows value. What next? Any suggestion? Please, forward.
Again, thanks
ReturnValue = SysCmd(acSysCmd SetStatus, "Getting " & Format(Facility , "000000") & " GL Data...")
datalistsql = "SELECT DISTINCTROW GLDownload_PA.O racle_Acct, GLDownload_PA.O racle_Dept, GLDownload_PA.O racle_JobCode, GLDownload_PA.A cctDesc, GLDownload_PA.D escription, tblPayrollDeptT ranslation.JobC odeDescription, Sum(GLDownload_ PA.Amount) AS SumOfAmount FROM GLDownload_PA LEFT JOIN tblPayrollDeptT ranslation ON GLDownload_PA.O racle_JobCode = tblPayrollDeptT ranslation.intJ obCodeNumber GROUP BY GLDownload_PA.O racle_Acct, GLDownload_PA.O racle_Dept, GLDownload_PA.O racle_JobCode, GLDownload_PA.A cctDesc, GLDownload_PA.D escription, tblPayrollDeptT ranslation.JobC odeDescription; "
Set DataList = MyDB.OpenRecord set(datalistsql , dbOpenSnapshot)
DataList.MoveLa st
DataList.MoveFi rst
RecordsToSend = DataList.Record Count
ReturnValue = SysCmd(acSysCmd InitMeter, "Sending" & Format(Facility , "000000") & " GL Data...", RecordsToSend)
For J = 1 To RecordsToSend
ReturnValue = SysCmd(acSysCmd UpdateMeter, J)
CostReport.Work sheets(Sheet).C ells(J, 2).Value = DataList!Oracle _Acct
CostReport.Work sheets(Sheet).C ells(J, 3).Value = DataList!Oracle _Dept
CostReport.Work sheets(Sheet).C ells(J, 4).Value = DataList!Oracle _JobCode
CostReport.Work sheets(Sheet).C ells(J, 5).Value = DataList!AcctDe sc
CostReport.Work sheets(Sheet).C ells(J, 6).Value = DataList!Descri ption
CostReport.Work sheets(Sheet).C ells(J, 7).Value = DataList!JobCod eDescription
CostReport.Work sheets(Sheet).C ells(J, 8).Value = DataList!SumOfA mount
DataList.MoveNe xt
Next J
*************** *************** *************** *********
The question is, when I finished above code but i wanna insert the heading before insert each rows.
What the next step should i code on? I stop. For example, it can display the rows value but I need the rows heading before rows value. What next? Any suggestion? Please, forward.
Again, thanks