Mark A Matte
markamatte at hotmail.com
Tue Jan 22 18:05:13 CST 2008
Hello All,
I am looping thru a recordset...and I need it to stop when it gets to a certain time. I am sure I am missing something simple...below is the code...it FAILS!!!...and I have no clue why...probably very simple...but anyway...any thoughts...even the IF fails...when they appear to be equal????
Dim RecordDT As Date
Dim RecordDT_end As Date
RecordDT_end = CDate(rst!Q_DT & " 4:30:00 PM")
RecordDT = CDate(rst!Q_DT & " 9:30:00 AM")
Do Until RecordDT = RecordDT_end
If RecordDT = RecordDT_end Then MsgBox "yes"
'Inner Loop
RecordDT = CDate(DateAdd("n", 30, RecordDT))
Loop
Thanks,
mark
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join