Error Message Run Time 2465

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
 
S

Scott McDaniel

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
 
V

Vexen Crabtree

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top