Date Validation

foxtet

Registered User.
Local time
Today, 15:10
Joined
May 21, 2011
Messages
129
Hi Guys
In the attached sample Db there are following tables
1) tblCargoMaster
2) tblClearanceDetails and
3) tblLoadingAndDelivary

in the frmCargoSearch when double clicked MAWBNo field frmCargoMaster opens. In that form I have provided tab control in it there are two tabs clearance, Loadding and delivery.

Now what I want do is
1) clearance date should not be earlier than flight date or earlier than loading date.
2) loading date should not be earlier than flight date OR clearance date.

if inappropriate date is entered msgbox should appear.

foxtet
 

Attachments

Use the date control BeforeUpdate event and test and date with the appropriate date criteria.
 
we have a dilemna here:
criteria:
1. Clearance Date < Loading Date
3. Loading Date < Clearance Date
 
if me.[Clearance Date] < me.[loading Date] AND
me.[loading Date] < me.[clearance date] then
dates failed - do whatever
else
dates passed - do whatever
end if

It looks like you dates have a time component, if so use the Date function to clear the time component of the dates.

Sorry, but I don't download databases.
 
we have a dilemna here:
criteria:
1. Clearance Date < Loading Date
3. Loading Date < Clearance Date

Flight date is cargoMaster Table the reference is not available in frmClearanceDtails. How can Flight date be available in Clearance Details form?

foxtet
 
sorry, so what is the correct validation?
Clearance date should be greater or equal to flight date and loading date.
how about loading date what is the condition?
 
sorry, so what is the correct validation?
Clearance date should be greater or equal to flight date and loading date.
how about loading date what is the condition?

In this program I need to check for date validation for the following
1. Cleared date
2. Delivered date
Already flight date is entered while entering new cargo. So now I have flight date entered

First open frmCargoSearch when double click to MAWBNo field frmCargo Master opens.
In this form I have provided tab control to update clearance loaded and delivery dates. Here I want;
1) Clearance date should be after flight date or same as flight date.
2) Delivery date cannot be earlier than flight date or clearance date.
3) Restrict entering loading date (in loading details tab) without have been entered correct
Clearance date
4) Restrict entering delivery date (in delivery details tab) without have been entered correct
Loaded date


foxtet
 

Attachments

Users who are viewing this thread

Back
Top Bottom