If Statement

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:
 
G

Guest

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" 來函:
 
D

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
 
G

Guest

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.
 
D

DS

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top