Error Message Run Time 2465

  • Thread starter Thread starter MKuria
  • Start date Start date
M

MKuria

I am running the code below And getting Runtime error 2465 MS cannot dind the
IM_Notes refered to in the expression.but it is on the list of propeties ????

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me![IM_Notes]) Then

If (Me![Initial Move Scheduled Pickup Date] _
<= Me![Service Start Date]) _
And (Me![Initial Move Scheduled Pickup Date] _
= Me![Service Completion Date]) _
Then

Cancel = True

MsgBox "Date is not within Service Dates - Explain ", vbCritical
Me.[IM_Notes].SetFocus
End If
End If
 
I am running the code below And getting Runtime error 2465 MS cannot dind the
IM_Notes refered to in the expression.but it is on the list of propeties ????

Do you have a Control named IM_Notes? Or is it named IM Notes (no underscore)?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me![IM_Notes]) Then

If (Me![Initial Move Scheduled Pickup Date] _
<= Me![Service Start Date]) _
And (Me![Initial Move Scheduled Pickup Date] _
= Me![Service Completion Date]) _
Then

Cancel = True

MsgBox "Date is not within Service Dates - Explain ", vbCritical
Me.[IM_Notes].SetFocus
End If
End If

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
I get similar errors sometimes; an object appears in the list of available
properties (normally this happens with fields), but any reference to it
causes an error. It normally happens when I edit a query and add another
field to the SELECT, and then go back to the form to use that field in the
code. Closing and opening the form doesn't fix it. What normally works for me
is:

* Remove the form's SQL from its data source field, save the form, and then
put the SQL back. This seems to update the form's available properties in a
way that saving, closing and opening doesn't.

MKuria said:
I am running the code below And getting Runtime error 2465 MS cannot dind the
IM_Notes refered to in the expression.but it is on the list of propeties ????

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me![IM_Notes]) Then

If (Me![Initial Move Scheduled Pickup Date] _
<= Me![Service Start Date]) _
And (Me![Initial Move Scheduled Pickup Date] _
= Me![Service Completion Date]) _
Then

Cancel = True

MsgBox "Date is not within Service Dates - Explain ", vbCritical
Me.[IM_Notes].SetFocus
End If
End If
 
Back
Top