If Statement

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I can't seem to get this If statemnet to work. I think it's the first
line. I need it to return "No Times Entered" if Both StartTime and
EndTime =00:00 Any help appreciated.
Thanks
DS

If Me.TxtStartTime & Me.TxtEndTime = "00:00" Then
MsgBox "No Times Entered"
ElseIf Me.TxtStartTime = "00:00" Then
MsgBox "No Start Time"
ElseIf Me.TxtEndTime = "00:00" Then
MsgBox "No End Time"
Else:
 
from Rainbow01 Hong Kong

in Access for time data --- use # e.g. #11:00 AM#
If Me.TxtStartTime & Me.TxtEndTime = "00:00" Then
need write separately:
If Me.TxtStartTime.Value = #your time# And Me.TxtEndTime.Value = #your time#


"DS" 來函:
 
Rainbow01 said:
from Rainbow01 Hong Kong

in Access for time data --- use # e.g. #11:00 AM#



need write separately:
If Me.TxtStartTime.Value = #your time# And Me.TxtEndTime.Value = #your time#


"DS" 來函:
Thanks, That got it to work!
DS
 
Jusy a side note, I use a lot of time fields also and one business rule that
you might think of is checking the start time against the end time to make
sure they are in order.
 
AkAlan said:
Jusy a side note, I use a lot of time fields also and one business rule that
you might think of is checking the start time against the end time to make
sure they are in order.

:
Thanks, I have them sorted in Ascending order....or should I put some
code to check that the end time is greater or later than the begining time?
Thanks
DS
 
Back
Top