Less than on time

Kallu

Registered User.
Local time
Today, 05:21
Joined
Nov 4, 2011
Messages
18
Hi ther.
I have table to register some informatinos, and i want to manage times.
Example: In my table i have DateInformations, TimeInformations, TimeSuite and TimeArrived.
I want to stop user entering less TimeSuite than TimeInformations and less TimeArrived than TimeSuite.
If TimeSuite < TimeInformations Then
MsgBox "Blla blla!", vbInformation, "Blla..."
Cancel = True
Me!TimeSuite.SetFocus
This code fork fine but, if i have time informations 23:30 and TimeSuite 00:05 not working. How can combine with date information and date (Now), or any other idea.
Thanks in help.
 
Last edited:
As I can understand you, you have to include "DateInformations" in your "If".
Send a short example of your mdb, (Access2000 or 2002-2003).
 
Example: If Time1 is 23:30,
I can't add Time2 = 00:05 or Time3 00:06.
Time1 is on 20.03.12. 23:30
Time2 is on 21.03.12. 00:05
Time3 is on 21.03.12. 00:06
 

Attachments

Here it is (attachment, zip).
Open Form1 and see.
I think it is what you want.
 

Attachments

I made some betterment in the VBA.
Look at 6. record. If the Time1 and Time2
are in 15.03.2012. and Time3 is in 16.03.2012.
I think you need it.
Look at attachment, zip, (VBA).
 

Attachments

I have no idea how you insert the data into your table but this should do the work for you.
It checks for the MAX time you already have for the specific date
Code:
dim MaxTime as string
 
MaxTime = DMAX([TimeSuite], Table_Name, DateInformations = " & Me.DateInformations & " ")
If Me.TimeSuite < MaxTime  Then
.....
 
Thanks MStef second exampla is exatly what I llooking 4, thank you very much.
 

Users who are viewing this thread

Back
Top Bottom