[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

VALIDATING TIME FIELD WITH VALIDATION RULE

Posted on 2001-08-14
4
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 20 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 53

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

656 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