Solved

VALIDATING TIME FIELD WITH VALIDATION RULE

Posted on 2001-08-14
4
234 Views
Last Modified: 2007-12-19
I have an ADP database that when entering a time with Short Time format as a textbox allows 00:70 and then freezes my system.  How can I trap this somehow before it locks up the system.  Maybe in the validation rule or something.
0
Comment
Question by:InvisibleMan
  • 3
4 Comments
 
LVL 6

Expert Comment

by:xSinbad
ID: 6387057
You could have an on change event that does a right for two characters and check to seee if they are less than 60.
0
 
LVL 6

Accepted Solution

by:
xSinbad earned 10 total points
ID: 6387061
example;

Private Sub Text0_Change()
Dim val As String, valMin As Double
val = Right(Me.Text0, 2)
valMin = CDbl(val)
If valMin > 60 Then
Me.Text0 = "00.00"
MsgBox "Problem with the minutes"
End If
End Sub
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6387147
Hi,

Use IsDate Function?
0
 
LVL 6

Expert Comment

by:xSinbad
ID: 6404633
InvisibleMan did my comment solve your problem? If it didnt then please dont accept it as an answer. I would rather not have it than have a C.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question