I get "2448 - You cannot assign a value to this object" When users try to increment the value via a "+" button I have made(see attached image). The strange part is that it's not all the time. Very random actually. So that is why i am reaching for help. Below is the code for the button.
The application is run using Access runtime 2010 SP1 in a .accdb format. I edit the application via access 2007.
Private Sub cmdSomeButtonClick_Click()
On Error GoTo err
Dim qty%
If IsNull([ReadonlyFieldInTheAttachedImage]) Then [ReadonlyFieldInTheAttachedImage] = 0
qty% = Val([ReadonlyFieldInTheAttachedImage])
qty% = qty% + 1
[ReadonlyFieldInTheAttachedImage] = qty%
Exit_cmdSomeButtonClick_Click:
Exit Sub
err:
MsgBox err.Number & err.Description
Exit Sub
Ok, so after looking at this. The text boxes control source is a number in the table. The code Val() is trying to convert a string to a number? Is this necessary if the control source is already a number? or is this necessary if the text box control is used?
as always your help is appreciated.