Answered by:
Error 2683 - Calendar

Question
-
Experts -
We have a little application here (written by somebody else) that was working fine until this morning - when an ActiveX calendar control started throwing the 2683 "There is no object in this control" error. We are working in Access 2010. The offending code is below:
Private Sub proddate_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) On Error GoTo CalErr txtcal.Visible = True txtcal.SetFocus If Not IsNull(proddate) Then txtcal.Value = proddate.Value Else txtcal.Value = Date End If CalExit: Exit Sub CalErr: MsgBox "There was a problem loading the calendar engine. Please input date manually (mm/dd/yyyy).", vbCritical, "Calendar Fail" Resume CalExit End Sub
The error is at this line:
txtcal.Value = proddate.Value
Strangely enough, the other Calendar controls in the application work fine.....
Any ideas?
Thanks in advance!
Bonediggler
Monday, October 2, 2017 3:41 PM
Answers
-
Did you check the References to see if the calendar control is missing? BTW, this component was deprecated in Access 2010 so I'm surprised you are still trying to use it.
Replacing the Calendar Control in Access 2010 Applications
Paul ~~~~ Microsoft MVP (Visual Basic)
- Edited by Paul P Clement IV Monday, October 2, 2017 4:32 PM sp
- Marked as answer by Bonediggler Monday, October 2, 2017 7:16 PM
Monday, October 2, 2017 4:32 PM -
Have you tried a Compact and Repair? a decompile?
Does your code compile without errors?
I avoid ActiveX controls like the plague! There are tons of 100% form based date pickers, I'd urge you to ditch the ActiveX one and switch, you'll be much better off in the long run doing so. See: http://www.devhut.net/2017/06/17/great-access-tools-calendar-controls/
Daniel Pineault, 2010-2017 Microsoft MVP
Professional Support: http://www.cardaconsultants.com
MS Access Tips and Code Samples: http://www.devhut.net- Marked as answer by Bonediggler Monday, October 2, 2017 7:16 PM
Monday, October 2, 2017 6:08 PM
All replies
-
Did you check the References to see if the calendar control is missing? BTW, this component was deprecated in Access 2010 so I'm surprised you are still trying to use it.
Replacing the Calendar Control in Access 2010 Applications
Paul ~~~~ Microsoft MVP (Visual Basic)
- Edited by Paul P Clement IV Monday, October 2, 2017 4:32 PM sp
- Marked as answer by Bonediggler Monday, October 2, 2017 7:16 PM
Monday, October 2, 2017 4:32 PM -
Have you tried a Compact and Repair? a decompile?
Does your code compile without errors?
I avoid ActiveX controls like the plague! There are tons of 100% form based date pickers, I'd urge you to ditch the ActiveX one and switch, you'll be much better off in the long run doing so. See: http://www.devhut.net/2017/06/17/great-access-tools-calendar-controls/
Daniel Pineault, 2010-2017 Microsoft MVP
Professional Support: http://www.cardaconsultants.com
MS Access Tips and Code Samples: http://www.devhut.net- Marked as answer by Bonediggler Monday, October 2, 2017 7:16 PM
Monday, October 2, 2017 6:08 PM -
The code compiles without errors, the compact does nothing, and strangely enough all the other ActiveX calendars in other forms work fine.
I requested the user to have Access reinstalled. We'll see if that helps.
Paul and Daniel - thanks for the helpful links, I will have to leverage these if the reinstall is fruitless.
Bonediggler
Monday, October 2, 2017 7:16 PM