I'm using a button and a macro to update a quantity field in a table. I am getting a 3113 runtime error. Anyone know what I should look for to fix this?
And, sorry, I was not able to upload the database.
I'm using a button and a macro to update a quantity field in a table. I am getting a 3113 runtime error. Anyone know what I should look for to fix this?
And, sorry, I was not able to upload the database.
What is this quantity field for and why do you need to use code to edit it? Is this a macro or VBA? Are you using SetValue action in macro?
What is the exact message given by the error?
Post code for analysis.
Why are you not able to upload database?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
As June7 said, we need to know how you're trying to do this. Error 3113 indicates that the Field cannot be updated.
Linq ;0)>
Error:
Runtime error '3113':
Cannot update 'Quantity'; Field not updatable
Code:
Private Sub PlusOne_Click()
DoCmd.SetWarnings False
Dim strSQL As String
strSQL = "UPDATE [Inventory] SET [Quantity] = [Quantity] + 1 " & _
"WHERE [Inventory].[ID] = " & Me!
[List] & ";"
DoCmd.RunSQL strSQL
Me!List.Requery
DoCmd.SetWarnings True
End Sub
This is for cataloging a card collection. There are many many things to sort by and the best way to update the quantity is from a form as sorting through 240000+ in a table would take forever and a day.
Why would the Quantity field not be updatable?
Why are you saving calculated value anyway? Saving calculated data is usually a bad idea, especially aggregate calcs.
Review http://allenbrowne.com/AppInventory.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.