Len
10-05-2001, 04:15 PM
I want to have my app write a report once/day at a certain time. How to do? Too many formats for time and can't get it to work.
Thanks
Len
Thanks
Len
Perform operation at a particular time...Len 10-05-2001, 04:15 PM I want to have my app write a report once/day at a certain time. How to do? Too many formats for time and can't get it to work. Thanks Len Len 10-05-2001, 04:43 PM Duh!! Sorry about that. Len JoeLeovinci 10-06-2001, 04:36 AM You can use a planned operation of your system. Search it in "control panel" and lunch your .exe at planned time each day. If you need you can do a control also in your program using a timer. Just do a periodical control (once a minute) in the timer event in wich you test if the system "DateTime" is the DateTime you want the program do the report. Contact me if you need the code. Bye anhmytran 10-06-2001, 07:16 AM Place a Timer control on an form which will stay unloaded during execution. Set its interval as 60,000 (a minute) and set it enabled property to True at starting time. In side the Timer Interval event, check the time to see if the set time is already passed, then issue the command. For example: Private Sub Form_Load() Timer1.Interval = 60000 End Sub Private Sub Timer1_Timer() Dim CurrentTime As Date CurrentTime = #9:11:00 AM# If CurrenTime < Now Then MsgBox Format(Now, "hh:mm:ss") ' Do your command, then stop the timer Timer.Enable = False End Sub AnhMy_Tran |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum