0
votes

I'm looking for some help in troubleshooting a database. Another person(who is no longer reachable) wrote this database and there are several bugs in it. The first comes when trying to access an input form. It is "run-time error '2683'. There is no object in this control. When I select the 'debug' option, the following statement is highlighted: "calDate.Value=GCalDate". I believe what happens on this form is that when it is first opened, the "date" control box is populated with the current date. However, because of this error, it is not functioning. When I try opening the form "calendar" that was created for this purpose, it gives a message "There is no object in this control".

One thing I noticed is that the form works well with Access 2003 and 2007. i was trying to edit it using access 2010 on my laptop and I noticed this error. Any idea how I can get rid of this error in 2010 version? (and still keep it compatible with Access 2007)

2

2 Answers

1
votes

Previous versions of Access came with an ActiveX control called the Calendar control, that lets you display a calendar for the user to choose a date. This Calendar control had a value property. It seems that Access 2010 doesn't support this ActiveX control.

On the other hand, in Access 2010 you can add a datepicker to any bound textbox if the data type is of Date/Time. A datepicker can be added to an unbound textbox as per the instructions here.

If you want something that is compatible with both Access 2003 and 2010, search for "access custom calendar control", to find something like the calendar form here.

0
votes

Here's a solution I've applied to make it possible to use the old ActiveX control in versions < 2010 (i.e., version < 14) and the new date picker in 14+:

'set appropriate date picker for date box based on application version
    If Val(Application.Version) >= 14 Then
        Me!btnFYStart.Visible = False
        Me!btnFYEnd.Visible = False
    Else
        Me!btnFYStart.Visible = True
        Me!btnFYEnd.Visible = True
    End If

(The buttons refer to the ActiveX control.)