Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 - 2010 control problems

Status
Not open for further replies.

dhulbert

Technical User
Jun 26, 2003
1,136
GB
I have a databse created in access 2003 which has a numebr of forms that contain calendar controls, when you click on the control the error message
"Run time Error 2683 there is no object in this control" is reported

If I debug the code behind the control is
Code:
Private Sub cmdCalFrom_Click()

Me.CalendarFrom.Visible = True

If Not IsNull(Me.txtstartDate) Then
    Me.CalendarFrom.Value = Me.txtstartDate
Else
    Me.CalendarFrom.Value = Date
End If

Exit_cmdCalFrom_Click:
    Exit Sub

Err_cmdCalFrom_Click:
    MsgBox Err.Description
    Resume Exit_cmdCalFrom_Click
End Sub

Ant ideas what the problem is, my VBA skills are a long way out of date so any pointers would be useful.
Thanks.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Which line is highlighted? From the error message, it looks like perhaps it's just not seeing one of the controls. So, perhaps either the Me.CalendarFrom or the Me.txtstartDate

Is the code placed within the Form module or a standard (independent of any forms or other Access objects) module?

One thing you could try, if everything seems alright, is to recreate the form with the same controls, making sure you name them the same, and then copy the code from your current form to the new form, and see if that works. If it does, then it means you had some corruption in that form object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top