Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
saidev
Posting Yak Master
101 Posts |
Posted - 2006-09-05 : 18:34:22
|
Hi Guys,I have a Report that is printing from 12:00:00AM.I want the Start time is from 6 AM. Can you guys modify the code or help me with any new suggestion. Appreciate your helpThanks,Option Compare DatabasePublic strStartDateVar As DatePublic strEndDateVar As DatePrivate Sub Report_Open(Cancel As Integer)Dim strSQL As StringDim intWeekDay As IntegerDim intTemp As IntegerDim intDiff As Integer'strStartDateVar = Month(Forms!frmReportPicker!axMonthlySchedule) & "/01/" & Year(Forms!frmReportPicker!axMonthlySchedule)strStartDateVar = Format(Forms!frmReportPicker!axAirDate1, "mm/dd/yyyy")intWeekDay = Weekday(strStartDateVar, vbMonday)intTemp = intWeekDay - (intWeekDay - 1)intDiff = intWeekDay - intTempIf intDiff <> 0 Then strStartDateVar = DateAdd("d", -intDiff, strStartDateVar)End If'strEndDateVar = Month(Forms!frmReportPicker!axMonthlySchedule) & "/01/" & Year(Forms!frmReportPicker!axMonthlySchedule)strEndDateVar = Format(Forms!frmReportPicker!axAirDate1, "mm/dd/yyyy")intWeekDay = Weekday(strEndDateVar, vbMonday)intTemp = intWeekDay - (intWeekDay - 7)intDiff = intWeekDay - intTempIf intDiff <> 0 Then strEndDateVar = DateAdd("d", -intDiff, strEndDateVar)End IfEnd Sub |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-09-05 : 20:06:07
|
This bit of code won't even get executed until the report is started. So the scheduling is done elsewhere. Most likely it's an NT scheduled task so that's a good place to start looking.HTH,Tim |
 |
|
|
|
|