Allow ShowDatePicker to be turned off globally
My systems use a calendar of my own design so I don't want the built-in Access date picker to appear, anywhere, ever.
In order to achieve this, I need to set the ShowDatePicker property on every single textbox that might display dates. In my case, that's across hundreds of forms.
Now, as it happens, I've written code to automate turning off this property but wouldn't it be much more convenient to provide a global setting that controlled, for the current database, whether the date picker appeared?
[Deleted User] commented
I agree with the suggestion, but have no votes left.
Here's a function I found a while back to disable it throughout all the forms of the database.
On Error GoTo Error_Handler
Dim ctl As control
Dim frm As AccessObject
For Each frm In CurrentProject.AllForms
DoCmd.OpenForm frm.Name, acDesign
For Each ctl In Forms(frm.Name).Form.Controls
Select Case ctl.ControlType
ctl.ShowDatePicker = 0
DoCmd.Close acForm, frm.Name, acSaveYes
On Error Resume Next
Set frm = Nothing
LogError Err.Number, Err.Description, _
sModName & "/DisableDatePicker", _