Susan Harkins
ssharkins at gmail.com
Tue Jan 22 18:35:25 CST 2008
I'm sure to be missing something here, but you're defining RecordDT_end and
RecordDT with two different time values, so regardless of what rst!Q_DT is,
they can never match.
Susan H.
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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com