You can't assign a value to this object

  • Thread starter Thread starter Bill R via AccessMonster.com
  • Start date Start date
B

Bill R via AccessMonster.com

I've looked through about a dozen posts on this subject but can't find an
adequate explanation for my particular situation. When I look at the values
and properties for the object (txtStatus) on the mainform (Parent) from the
immediate window while the code in the subform is running, I get the
appropriate values. Yet I get this error msg when I try to update the value.
Here's the code:

Private Sub Form_Current()
With Me.Parent.Controls("txtStatus")
.Locked = False
.Value = SetDesStatus 'function that returns a string
.Locked = True
End With
End Sub

When the SetDesStatus function runs, I get the error msg upon return to the
line ".Value ="... and if I continue to run the code, it will run the
function again and return the same error again and debug to the same line
again.

Bill
 
bill,
that sounds pretty strange (i've done similar things but i don't get the
error). hv you try replacing the function w/ a str/value you hardcoded (as a
troubleshooting steps) to see if that's a problem in the sub or out of the
sub?
 
thanks for you suggestion Jeff.

I decided to skip the event altogether and work around it. I suspect I was
doing something in the wrong order or something. Just one of those things to
investigate at a future date.

Bill
bill,
that sounds pretty strange (i've done similar things but i don't get the
error). hv you try replacing the function w/ a str/value you hardcoded (as a
troubleshooting steps) to see if that's a problem in the sub or out of the
sub?
I've looked through about a dozen posts on this subject but can't find an
adequate explanation for my particular situation. When I look at the values
[quoted text clipped - 17 lines]
 
Bill R,

I'm having the same error message from a filter on a form that I'm trying to
apply. It seems to be linked to an apostrophe in the field. When the
apostrophe is removed the error does not occur and the filter works!?!
 
Back
Top