C
cr113
I'm getting the following error when trying to change the value of a
textbox. "Run-time error '2115'. The macro or function set to the
Before Update or Validation property for this field is preventing the
application from saving the data in the field."
I've removed almost everything from my access project. No tables. One
form containing a listbox and a textbox. The Before Update, Validation
Rule and Validation Text properties are all blank for both controls.
Here is all the code in the form:
Private Sub ListBox1_Click()
TextBox1.SetFocus
TextBox1.Text = "abc" 'this is where I get the error
End Sub
I am very confused as to what is happening. For one thing my "unbound"
listbox is displaying rows of data despite the fact that I have not
populated it. It's displaying data from previous versions of my
project. Why is this?
I also don't understand why these controls seem to be acting as though
they are bound, why are they hitting a before update event if they are
unbound? Why is it trying to "save" the data if it's unbound? Am I not
"unbinding" the controls correctly? Do I need to set some property of
the form or control to make it unbound maybe?
textbox. "Run-time error '2115'. The macro or function set to the
Before Update or Validation property for this field is preventing the
application from saving the data in the field."
I've removed almost everything from my access project. No tables. One
form containing a listbox and a textbox. The Before Update, Validation
Rule and Validation Text properties are all blank for both controls.
Here is all the code in the form:
Private Sub ListBox1_Click()
TextBox1.SetFocus
TextBox1.Text = "abc" 'this is where I get the error
End Sub
I am very confused as to what is happening. For one thing my "unbound"
listbox is displaying rows of data despite the fact that I have not
populated it. It's displaying data from previous versions of my
project. Why is this?
I also don't understand why these controls seem to be acting as though
they are bound, why are they hitting a before update event if they are
unbound? Why is it trying to "save" the data if it's unbound? Am I not
"unbinding" the controls correctly? Do I need to set some property of
the form or control to make it unbound maybe?