
"SELECT dbo_vwReferrals.Service, Format(,""yyyymm"") AS, Count(dbo_vwSchedules.SCHDL_REFNO) AS CountOfSCHDL_REFNO, IIf(=,""First"",""F/Up"") AS INTO tblCommNew " & vbCrLf & _

StrSql = "PARAMETERS StartDate DateTime, EndDate DateTime " & vbCrLf & _ Set datasheet = ("RawData")Ĭall Report_Run(LOCReport, datasheet, RepType)ĪppExcel.StatusBar = "Running Community First Appointments" Set LOCReport = CurrentDb.OpenRecordset("SELECT tblDNUReferals.Service, tblDNUReferals.Date, tblDNUReferals.CountOfREFRL_REFNO FROM tblDNUReferals") 'selects all the data from the newly formed table "GROUP BY dbo_vwReferrals.Service, Format(,""yyyymm"") " "WHERE (((dbo_vwReferrals.RefrlDate) Between And ) AND ((dbo_vwReferrals.ServiceID) Like ""dnu"") AND ((dbo_vwReferrals.StatusID) Not In (""R"",""C""))) " & vbCrLf & _ "SELECT dbo_vwReferrals.Service, Format(,""yyyymm"") AS, Count(dbo_vwReferrals.REFRL_REFNO) AS CountOfREFRL_REFNO INTO tblDNUReferals " & vbCrLf & _ StrSql = "PARAMETERS Startdate DateTime, EndDate DateTime " & vbCrLf & _ 'runs the querie and puts the data into seperate table Select Case !!Ī "C:\Documents and Settings\msundhu\Desktop\Copy of DNU Activity_Revised.xls",, True Set AppExcel = CreateObject("excel.application")

Please find my procedure below with the querys also. I am trying to insert a piece of code so the odbc databases timeout is set to 120secs rather then the standard 60secs.Ĭould somebody tel me the code to insert and where to insert it?
