Solved Run-time Error '-2147352567 (800200009)': ???? (1 Viewer)

hbrehmer

Member
Local time
Yesterday, 18:21
Joined
Jan 10, 2020
Messages
78
Help if you can!

I have an option box on a form that has worked just fine, but for some reason it stopped working. When I select one of the "options" I get the following run time error:

Run-time error ' -2147352567 (80020009)':

Field cannot be updated.

This is my code attached to the option box:

Option Compare Database
Option Explicit

Private Sub ShipStatus_AfterUpdate()

Select Case Me.ShipStatus
Case 1
Me.ODStatusID = 4
Me.OrderStatusID = 3
Case 2
Me.ODStatusID = 5 - This is where it appears to error out when I run the Debug.
Me.OrderStatusID = 4
End Select

End Sub

What am I missing? The fields have not changed on the form. They are hidden, but have not moved or changed at all. I'm stumped.

Heidi
 

Ranman256

Well-known member
Local time
Yesterday, 21:21
Joined
Apr 9, 2015
Messages
4,337
these long err numbers (esp. negative) are control errors (not code)...
which says either the control ODStatusID is not connected to the db, or cant accept a value.
Is it a textbox?
is the control the acutal name: ODStatusID ?
 

ontopofmalvern

Registered User.
Local time
Today, 02:21
Joined
Mar 24, 2017
Messages
64
I presume you have checked the control is still there? and that is unbound?
Do you know if the line of code below is functioning (comment out the line not working to check)
Have you move the code from the form to a module?

I'd have a go at deleting control and recreating it.

Something must have changed if it used to work.
 

isladogs

MVP / VIP
Local time
Today, 02:21
Joined
Jan 14, 2017
Messages
18,216
I would also check if you have a validation rule for that field which prevents the value 5 being assigned
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:21
Joined
May 7, 2009
Messages
19,231
is the field a calculated from the query?
 

hbrehmer

Member
Local time
Yesterday, 18:21
Joined
Jan 10, 2020
Messages
78
these long err numbers (esp. negative) are control errors (not code)...
which says either the control ODStatusID is not connected to the db, or cant accept a value.
Is it a textbox?
is the control the acutal name: ODStatusID ?
Thank you for your response. Yes the control is connect to the database, and No it is not a textbox. The control name of the Option box is "ShipStatus". The ODStatusID and OrderStatusID are numeric fields from two different tables. I have an Orders table that is a one to many to an OrdersDetails table. So I have one order with many lines to it (part numbers). So I need to close each line of an Order and do it through this option box. I do have both fields in the query that feeds the form. So, when I'm on the form and enter data for the shipment, I can have multiple parts for the order. I need to change the status of each line of the Order to "Shipped Partial (1)" or "Shipped Complete (2)". As I'm typing this, I realized that I can't do this.
 

hbrehmer

Member
Local time
Yesterday, 18:21
Joined
Jan 10, 2020
Messages
78
Never mind, everyone! I realized that I changed things in my process and now I can't use this button here. I need to change my thought process on changing two different status codes on two different tables.

Thank you for everyone's help!
 

Users who are viewing this thread

Top Bottom