Chintsapete
Registered User.
- Local time
- Today, 04:54
- Joined
- Jun 15, 2012
- Messages
- 137
This used to work on Office 2007 no problem, I upgraded recently to office 2016 and since then it gives me an error on open: The control name is misspelled or refers to a control that doesn’t exist. Said control does exist and the macro seems to work as far as the goto control.
I have a form based on a query with 3 columns:
FromDate: DateSerial(Year([PayDate]),Month([PayDate]),1)
ToDate: DateSerial(Year([PayDate]),Month([PayDate])+1,0)
MonthSel: Format([PayDate],"mmm-yyyy")
Above query works fine
I open the form with command button with the embedded macro:
OpenForm -> FormName
GotoControl -> ControlName (Combo Box showing current month, when I select any previous month, it used to update the ToDate – FromDate to month selected)
SetProperty -> ControlName -> Property -> Enabled -> Value -> True
That control has a macro:
SearchForRecord
-Object Type: blank
Object Name: blank
Record -> First
Where Condition -> = ="[Month] = " & "'" & [Screen].[ActiveControl] & "'"
Something must have changed from Office 2007 to Office 2016 that this is not working no more. This is virtually the only thing in my database that doesn’t seem to work after I upgraded to Office 2016.
Any help would be appreciated
Thanks
Pete
I have a form based on a query with 3 columns:
FromDate: DateSerial(Year([PayDate]),Month([PayDate]),1)
ToDate: DateSerial(Year([PayDate]),Month([PayDate])+1,0)
MonthSel: Format([PayDate],"mmm-yyyy")
Above query works fine
I open the form with command button with the embedded macro:
OpenForm -> FormName
GotoControl -> ControlName (Combo Box showing current month, when I select any previous month, it used to update the ToDate – FromDate to month selected)
SetProperty -> ControlName -> Property -> Enabled -> Value -> True
That control has a macro:
SearchForRecord
-Object Type: blank
Object Name: blank
Record -> First
Where Condition -> = ="[Month] = " & "'" & [Screen].[ActiveControl] & "'"
Something must have changed from Office 2007 to Office 2016 that this is not working no more. This is virtually the only thing in my database that doesn’t seem to work after I upgraded to Office 2016.
Any help would be appreciated
Thanks
Pete