LeiDBug007
Technical User
Ever seen this error message?
"You can't assign a value to this object...The object may be a control on a read-only form...The object may be on a form that is open in Design view...The value may be too large for this field."
We keep getting it when trying to enter information in a subform within our form. It's a record box for notes to be entered. When you try to enter notes, this message box (error) pops up... then when we OK the message box, we're OK to enter data? Weird. It just always pops from the start of a new record, then after OK-ing we're good to enter data (?).
Here's the code for this field as well:
Option Compare Database
Option Explicit
Private Sub Form_Current()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
Else
ntNotes.Locked = True
End If
End Sub
Private Sub ntNotes_AfterUpdate()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
MsgBox "You must enter notes in this field!"
End If
End Sub
FYI: In the table, we marked this field as a required field in the properties. Even when I make it a non-required field, it still pops that error message so I don't think it's that.
FYI2: No relationships have been set on this field, subform or form.
Please help!!! Thanx!
~LeiDBug007
"You can't assign a value to this object...The object may be a control on a read-only form...The object may be on a form that is open in Design view...The value may be too large for this field."
We keep getting it when trying to enter information in a subform within our form. It's a record box for notes to be entered. When you try to enter notes, this message box (error) pops up... then when we OK the message box, we're OK to enter data? Weird. It just always pops from the start of a new record, then after OK-ing we're good to enter data (?).
Here's the code for this field as well:
Option Compare Database
Option Explicit
Private Sub Form_Current()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
Else
ntNotes.Locked = True
End If
End Sub
Private Sub ntNotes_AfterUpdate()
If IsNull(Me.ntNotes.Value) Then
Me.ntNotes.Locked = False
MsgBox "You must enter notes in this field!"
End If
End Sub
FYI: In the table, we marked this field as a required field in the properties. Even when I make it a non-required field, it still pops that error message so I don't think it's that.
FYI2: No relationships have been set on this field, subform or form.
Please help!!! Thanx!
~LeiDBug007