Ms Access Error 3156
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Run Time error 3156 ODBC Delete on a linked table TABLENAME failed Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote Hi , Since from one week i am facing problem in msaccess The problem is "Run Time error 3156 ODBC Delete on a linked table TABLENAME failed" Initially iam retrieving the data from multiple tables and later inserting the data into the table the table consists of 6000 records the query as follows: query: INSERT INTO tblProposal_Search_Result (Specification_Nbr, Specification_Version, Request_Date, REASON_REQUEST, CAS_Nbr, Chemical_Name, Product_Name, Business_Unit_Description, Customer_Name, Specification_Type_Description, Specification_Status_Desc) SELECT Specification_Nbr, Specification_Version, Request_Date, TBLREQUEST_CATEGORY.REQUEST_CATEGORY_DESCRIPTION, CAS_Nbr, Chemical_Name, Product_Name, Business_Unit_Description, tblSpecification.Customer_Name, Specification_Type_Description, Specification_Status_Desc FROM ((((tblSpecification LEFT JOIN tblBusiness_Unit ON tblSpecification.Business_Unit_Code = tblBusiness_Unit.Business_Unit_Code) LEFT JOIN tblSpecification_Type ON tblSpecification.Specification_Type_Code = tblSpecification_Type.Specification_Type_Code) LEFT JOIN tblSpecification_Status ON tblSpe
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 Rate Thread Display Modes 07-06-2014, 07:13 PM #1 bluestuck Newly Registered User Join Date: Apr 2014 Posts: 9 Thanks: 2 Thanked 0 Times in 0 Posts Getting Error Runtime Error 3156 hii everyone, I got error runtime error 3156 when i delete it. i'v tried to this code, but i got the same errors message. Code: Dim strSQL As String strSQL = "DELETE FROM " & Table & " where [_date] between #" & Form_frm_dbo_cfa.cmbdate1.Value & "# and #" & Form_frm_dbo_cfa.cmbdate2.Value & "#" DoCmd.SetWarnings False DoCmd.RunSQL strSQL DoCmd.SetWarnings True Code: Dim strSQL https://social.msdn.microsoft.com/Forums/office/en-US/4e9c0bca-351b-4ab5-8550-84102dd394e0/run-time-error-3156-odbc-delete-on-a-linked-table-tablename-failed?forum=accessdev As String DIM db as Database strSQL = "DELETE FROM " & Table & " where [_date] between #" & Form_frm_dbo_cfa.cmbdate1.Value & "# and #" & Form_frm_dbo_cfa.cmbdate2.Value & "#" Set db = CurrentDb Set rs = db.OpenRecordset(strSQL) Does anyone knows how to fix it ? Thanks a lot bluestuck View Public Profile Find More Posts by bluestuck 07-06-2014, 07:46 PM #2 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,922 http://www.access-programmers.co.uk/forums/showthread.php?t=266507 Thanks: 6 Thanked 3,236 Times in 3,182 Posts Re: Getting Error Runtime Error 3156 This may help: http://www.baldyweb.com/ImmediateWindow.htm May help to know the error description. __________________ Paul Microsoft Access MVP To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. pbaldy View Public Profile Find More Posts by pbaldy 07-06-2014, 08:21 PM #3 JHB Have been here a while Join Date: Jun 2012 Location: In the south of Denmark (Jutland), near the German border. Posts: 6,081 Thanks: 2 Thanked 1,590 Times in 1,565 Posts Re: Getting Error Runtime Error 3156 I think you are missing the "*": Quote: strSQL = "DELETE * FROM " & Table & " where [_date] between #" & Form_frm_dbo_cfa.cmbdate1.Value & "# and #" & Form_frm_dbo_cfa.cmbdate2.Value & "#" __________________ If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up." JHB View Public Profile Find More Posts by JHB 07-06-2014, 09:04 PM #4 Galaxiom Super Moderator Join Date: Jan 2009 Location: NSW Australia Posts: 10,265 Thanks: 52 Thanked 1,174 Times in 1,111 Posts Re: Getting Error Runtime Error 3156 This is not the recommended way reference a control on a form. Form_frm_dbo_cfa.cmbdate1.Value It should be referenced via the Forms collection: Forms!frm_dbo_cfa.cmbdate1 Or, if the code module is on the same form:
finding the source of the ODBC error 3156 (Delete on linked table