Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time but not seconds

Status
Not open for further replies.

8441

Technical User
May 9, 2001
54
GB
I have a form with 6 textboxes on it:

Allocated
Mobile
AtScene
LeftScene
AtHospital
Green

Each textbox defaults to the current time when the user enters it. There is validation on the entries when a time is put in to check it isn't earlier than the previous box in the order above. The problem I have is when the default time is entered and then the users puts in a different time in a later box but then changes it to the time in the previous box the validation falls over. I think it is to do with the seconds being stored although both the table field and text box is set to short time which shouldn't show the seconds.

Example.

Mobile entry is defaulted to 12:15 in the display
AtScene entry is put to 12:16

User then needs to change AtScene to 12:15. The validation tells me it is invalid.

The code behind it checks that Mobile isn't greater then AtScene, as you can't be at scene before you are towards something or at it.

I think the problem is seconds. is there a way of getting rid of seconds completely so only storing hours and minutes.

Thanks
 
Can't you make it Greater than OR EQUAL to? Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
The Validation will prevent the entered time being accepted if it is earlier than the previous text box. IE AtScene is earlier than Mobile time. Therefore I am only interested in the first time being greater than the second time.

The problem is when two times appear to be the same. The first being taken from the default entered by Access and the second entered by the user the validation I have coded says invalid time. BUT when I manually enter the same time in the two boxes it is fine. This leads me to think the default time by access includes seconds, hence why I won't to get rid of them.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top