Not sure what to do with this error
With the database open press Ctrl + g. In the Immediate window type this and
press Enter:
Debug.Print Now()
You should get the current date and time. If not you probably have a
reference problem.
If Me!CommtExpireDateZ is null, this could cause a problem as it can't be
evaluated against Now(). You might want to wrap it in the NZ function.
Next with the form open and on a record, type something like the following
in the Immediate window the hit enter:
Debug.Print Forms![TheFormsName]![CommtExpireDateZ]
Make sure to insert the correct form name. It should return the data
displayed in that field. If not, there's a problem.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
"Mike" wrote:
Folks,
I"m trying to figure out what to do with an error we are getting, and I
don't know what I'm looking at unfortunately. We had a employee who created
a glorified mail merg with access 2003. He has since left the company. We
have users wanting to use the program, and we are getting an error, and I
don't know how to fix it. Have not done any access programming myself.
Users are getting a Run-Time Error 2683 - There is no object in this
control. A quick google search mentions registering mscomctl2.ocx, but that
doesn't seem to make the error go away.
When I hit debug, I get this:
'This code causes the Commitment Expiration date text box--which i am using
as label
'to change based on a comparison of todays date and the date in the
DatePicker for
'the commitment expiration date.
Private Sub Form_Current()
If Me!CommtExpireDateZ = Now() Then
Me![CommtLabel] = "Commitment has EXPIRED!"
Else
Me![CommtLabel] = "Commitment Expiration:"
End If
End Sub
The "If Me!CommtExpireDateZ =Now() Then line is hightlighted in the debug
screen.
I have no idea what to do to fix this, any advice from the experts here?
Thanks,
Mike
|