Error 3073 Vba
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn operation must use an updateable query access 2010 more about Stack Overflow the company Business Learn more about hiring developers or operation must use an updateable query vba posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Operation Must Use An Updateable Query Access 2013
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Operation must use an updatable query. (Error 3073) Microsoft Access
Runtime Error 3073 Operation Must Use An Updateable Query
up vote 2 down vote favorite I have written this query: UPDATE tbl_stock1 SET tbl_stock1.weight1 = ( select (b.weight1 - c.weight_in_gram) as temp from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' and c.status <> 'D' ), tbl_stock1.qty1 = ( select (b.qty1 - c.qty) as temp1 from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and operation must use an updateable query excel vba b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' and c.status <> 'D' ) WHERE tbl_stock1.item_submodel_id = 'ISUBM/1' and tbl_stock1.status <> 'D'; I got this error message: Operation must use an updatable query. (Error 3073) Microsoft Access But if I run the same query in SQL Server it will be executed. Thanks, dinesh ms-access vba access-vba jet share|improve this question edited Aug 5 '09 at 14:34 BIBD 9,0482059102 asked Aug 5 '09 at 5:30 Dinesh add a comment| 5 Answers 5 active oldest votes up vote 2 down vote I'm quite sure the JET DB Engine treats any query with a subquery as non-updateable. This is most likely the reason for the error and, thus, you'll need to rework the logic and avoid the subqueries. As a test, you might also try to remove the calculation (the subtraction) being performed in each of the two subqueries. This calculation may not be playing nicely with the update as well. share|improve this answer edited Aug 5 '09 at 6:24 answered Aug 5 '09 at 6:04 Ben Griswold 9,689114556 Depends on the subquery. Subqueries in WHERE clauses do not have that effect. Subqueries in the FROM may or may not, depending on various issues.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business
Operation Must Use An Updateable Query C#
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation operation must use an updateable query access 2003 Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just operation must be an updateable query access 2013 like you, helping each other. Join them; it only takes a minute: Sign up INSERT INTO in MS Access 2010 SOMETIMES GETS ERROR: 3073 Operation must use an updateable query up vote 1 down vote favorite I http://stackoverflow.com/questions/1231350/operation-must-use-an-updatable-query-error-3073-microsoft-access get the ERROR: 3073 Operation must use an updateable query SOMETIMES, while performing an INSERT statment. I have no problem on my windows 7 PC, but the person I am writing this for sometimes gets the error. She also has MS Access 2010 on Windows 7. As I said I have never got it on my PC, and she only gets it sometimes. The code will insert a number of rows and then through the http://stackoverflow.com/questions/5201176/insert-into-in-ms-access-2010-sometimes-gets-error-3073-operation-must-use-an-u error, and other times not through the erro at all. The error occurs if I have the code and data in one .mdb file or seperate files. Here a snippet of code: OrderHdrInsertStmnt = " INSERT INTO ORDER_HDR " _ & "(ORDER_ID, SOURCE_CODE, ORDER_DATE, SHIP_FNAME, SHIP_LNAME, SHIP_EMAIL, SHIP_COMP, SHIP_PHONE, SHIP_ADDR, SHIP_CITY, SHIP_STATE, SHIP_ZIP, SHIP_CNTRY, " _ & " BILL_FNAME, BILL_LNAME, BILL_EMAIL, BILL_COMP, BILL_PHONE, BILL_ADDR, BILL_CITY, BILL_STATE, BILL_ZIP, BILL_CNTRY, " _ & " TAX, SHIPPING, TOTAL, MOD_DATE, INSERT_DATE) " _ & " VALUES (" _ & "'" & OrderId & "','" & SourceCode & "','" & Orderdate & "','" & ShipFName & "','" & ShipLName & "','" & ShipEmail & "','" & ShipComp & "','" & ShipPhone & "','" & ShipAddr & "','" & ShipCity & "','" & ShipState & "','" & ShipZip & "','" & ShipCntry _ & "','" & BillFName & "','" & BillLName & "','" & BillEmail & "','" & BillComp & "','" & BillPhone & "','" & BillAddr & "','" & BillCity & "','" & BillState & "','" & BillZip & "','" & BillCntry _ & "','" & OrderTax & "','" & OrderShipping & "','" & OrderTotal & "','" & ImportDate & "','" & ImportDate & "');" then I use dbsCurrent.Execute OrderHdrInsertStmnt, dbFailOnError Any assistance would be great! ms-access vba share|improve this question edited Mar 5 '11 at 7:16 Ton
Posts Search Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rating: Display Modes 09-14-2011, 12:45 AM #1 bulbisi Newly http://www.access-programmers.co.uk/forums/showthread.php?t=215498 Registered User Join Date: Jan 2011 Location: Brussels, Belgium Posts: 51 Thanks: 8 Thanked 1 https://bytes.com/topic/access/answers/442636-run-time-error-3073-a Time in 1 Post Run-time error 3073 Operation must use an updateable query Hello all, it looks like i have an issue. I wanted to avoid a kind of temporary table as the DB I'm creating is quite heavy and complex already. Before: 1 Append Query to Table 1 Update Query to fill a new table from the previously created table It worked like a operation must charm but was way to heavy and slow to control (more than 22.000 records every week just for this table) So I wanted to use a Select Query instead the first step After: 1 Select Query 1 Update Query to fill a new table from the previous Select Query Then of course I got an error 3073. Note: The update query is running through VBA. Note: I might try a nested Select into the update Query, but i really don't an updateable query know how to use it. Note: Access 2010 Code for Select Query: Code: SELECT T_CE_TOBE.DebtorNumber, Max(DateDiff("m",[EndOfMonthDate],DateAdd("m",[tblco.Ter],[tblCO.StsLIVDat]))) AS ResidualMonths FROM T_CE_TOBE INNER JOIN tblCO ON T_CE_TOBE.DebtorNumber = tblCO.DebNum GROUP BY T_CE_TOBE.DebtorNumber; Code for Update Query (in VBA): Code: UpdateMonths = "UPDATE T_CE_TOBE LEFT JOIN Q_CE_TOBE_periods ON T_CE_TOBE.DebtorNumber = Q_CE_TOBE_periods.DebtorNumber SET T_CE_TOBE.ResidualMonths = [Q_CE_TOBE_periods].[ResidualMonths]" DoCmd.RunSQL UpdateMonths Any help is really appreciated and thanks a lot in advance bulbisi View Public Profile Find More Posts by bulbisi 09-14-2011, 10:18 AM #2 PNGBill Win XP MS Access 2010 Join Date: Jul 2008 Location: Papua New Guinea & NZ Posts: 2,251 Thanks: 63 Thanked 77 Times in 73 Posts Re: Run-time error 3073 Operation must use an updateable query You can delete the temporary table or all records in that table once it has served it's purpose. Did you test the query first before putting it into your vba code ? The code for your query doesn't look correct. I thought you needed Insert not Update when adding a new record to a table. Update will change the value of a field in an exisitng record. Insert appends a new record to a table. PNGBill View Public Profile Find More Posts by PNGBill 09-14-2011, 11:16 PM #3 bulbisi Newly Registered User Join Date: Jan 2011 Location: Brussels, Belgium Posts: 51 Thanks: 8 Thanked 1 Time in 1 Post Re: Run-time error
question and get tips & solutions from a community of 418,509 IT Pros & Developers. It's quick & easy. run-time error 3073 P: n/a jj hi I have got the following query which I try to run: UPDATE Qry_temp INNER JOIN Tbl_TEMP ON Qry_temp.Maaned = Tbl_TEMP.Maaned SET " _ & "Tbl_TEMP.Reklamationer = [Qry_temp]![Antal] Tbl_temp is a table and qry_temp a query. when I run the query the run-time error 3073 shows - "You need an updateable query" Any surgestion how to solve this Thanks JJ Jan 8 '06 #1 Post Reply Share this Question 4 Replies P: n/a Terry Kreft Is Qry_temp updateable? Open Qry_temp in datasheet view and see if you can update values if you can't then that's your problem. -- Terry Kreft "jj"