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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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