Date Validation Rule Problem

G Marshall

Board Regular
Joined
Dec 31, 2002
Messages
134
Hello

I have an invoice form in which there are two date fields, one called orderDate and the other deliveryDate. I have set the validation rule for the deliveryDate as being >=orderDate.

I have also used an on Dbl Click event procedure in both fields which opens a calendar and when any particular date is double clicked it automatically enters the date on my form.

My problem is this, when I manually enter the date in the deliveryDate field it will warn me when my date is prior to my order date as per my validation rule. However when I enter the date via the doublk click on the calendar my deliveryDate field will accept any date. It seems to ignore my validation rule. I would appreciate any thoughts on this.

I have another question, When I open my form it always opens at the first record, how can I set it to open at a blank page?

I would appreciate any help


Thanks

Gerald
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
On validation, you could always just add a validation step inside the onclick event.

For moving to new records, depends on the recordsource for the form.
Throwing this into the Form_Open event might do the trick.

DoCmd.GoToRecord , , acNewRec

Mike
 
Upvote 0
Hi Mike

Thanks for those suggestions , I have applied them and they work perfectly. On the subject of the Calendar there is another problem that I have and you may be able to help.
The date I created the Calendar and linked it to my form is the date that the calendar has highlighted each time I open it. How do I activate my calendar to highlight the current date each time it is opened?
Appreciate any suggestions.

Thanks

Gerald
 
Upvote 0

Forum statistics

Threads
1,222,243
Messages
6,164,789
Members
451,917
Latest member
WEB78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top