Solved

VALIDATING TIME FIELD WITH VALIDATION RULE

Posted on 2001-08-14
4
240 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 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 52

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

739 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