Hey, I'm currently working on an A Level project in access.

I have a 'date of entry' and a 'order expected date' field in a form (these fields are in two separate tables, the form has been created via a query linking these two tables together).

I want to put in a validation rule into the 'order expected date' that doesn't allow the date entered to be before the 'date of entry'.

I have tried > Date_of_Entry however, when a valid date is entered it doesn't accept it. Does anyone have any ideas as to what expression might work?

Any help would be greatly appreciated!

Computer200

Member Avatar for Member #33065

The way that I would handle this is through VB on the form. You could use something like this on the after_update property of the order expected date text box:

if (me!order_expected_date < me!date_of_entry) then
msgbox "You have entered an invalid date"
me!order_expected_date.setfocus
end if

-- cheers

Andy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.