Calendar Control - Stop Future Dates?

I have modified Mile-O-Phile's example to stop future dates for any field depending on the settings you send in the Openargs. It adds an extra element to the Openargs settings already used by using a True/False setting after the control name to decide if future dates should be stopped or not. To stop future dates set value of True, False will allow future dates.

Thus OpenArgs for allowing future date
Me.Name & ";ControlName;False"

and for not alowing future dates
Me.Name & ";ControlName;True"
 

Attachments

Now all we need to do is allow for the calendar to be called from a form, a subform, or a sub-subform. :rolleyes:
 
Thanks, antomac. I like that one. Cheers
 
Am having trouble applying this to my database!

It doesn't like this code

Run Time Error 2450

Microsoft Access can't find the form " referred to in a macro expression or Visual Basic Code.

It then highlights this line when I attempt to debug...

Forms(strForm).Controls(strControl) = Me.ctlCalendar.Value

Is there something I need to do with strForm & strControl?

:confused:

Thanks

Andy
 
Sounds like you aren't sending any arguments to the calendar form. Have a look at this - the calendar won't open if you don't send it arguments and you can restrict a lot more.
 
Mile,

That example was SO idiot proof even I can get it to work right! :p

Thanks for all your example databases, sorry it took so long to finally fix!

Andy


:D
 
No probs. Class modules are great! :cool:
 

Users who are viewing this thread

Back
Top Bottom