Thanks for reply. I tried cobbling together a little code, which appears to work without error but does nothing. Any thoughts?
Function FixAllForms()
Dim accobj As AccessObject
For Each accobj In CurrentProject.AllForms
Call FixDatePicker(accobj.name)
Next
End Function
Function FixDatePicker(strFormName As String, Optional bSaveAndClose As Boolean, Optional bHidden As Boolean)
Dim frm As Form
Dim ctl As Control
Dim strName As String
Dim bChanged As Boolean
DoCmd.OpenForm strFormName, acDesign, windowmode:=IIf(bHidden, acHidden, acWindowNormal)
Set frm = Forms(strFormName)
For Each ctl In frm.Controls
If ctl.ControlType = acTextBox Then
ctl.ShowDatePicker = False
End If
Next
Set ctl = Nothing
Set frm = Nothing
If Not bChanged Then
DoCmd.Close acForm, strFormName, acSaveNo
ElseIf bSaveAndClose Then
DoCmd.Close acForm, strFormName, acSaveYes
End If
End Function
Thanks
Dave