Ms Access Error 2342
Contents |
Case and Cooling Fetish CPU & Motherboard Technologia Mobile Computing Outpost Networking Matrix Other Hardware Agora Classifieds
Runtime Error 7874
Ars DIY Forum (Name TBD!) Operating Systems & Software run a select query in vba access Battlefront Microsoft OS & Software Colloquium Linux Kung Fu Windows Technical Mojo Distributed Computing
A Runsql Action Requires An Argument Consisting Of An Sql Statement
Arcana Macintoshian Achaia Programmer's Symposium The Server Room Ars Lykaion Gaming, Extra Strength Caplets The Lounge The Soap Box The Boardroom select query in access vba The Observatory Ars Help & Feedback Ars Subscription Member Areas Image Galleries MS Access DoCMD.RunSQL == Run-time error '2342' 7 posts LordJosh "Down with Pants! Up with Skirts!" Ars Legatus Legionis et Subscriptor Tribus: Derry, NH, USA Registered: Jul 11, 2003Posts: 11252 Posted: Thu Jan 26, 2006 9:04 am Run-time Error '2342' states:"A RunSQL action requires openrecordset access an argument consisting of an SQL statement."I am having some issues with an inline query to sum up the amount of payments made in this one database (which logs all Overpayments made, this SQL is to figure out which have been paid back to the proper amount)Here is some code (this is within the _Click() subroutine for a button):Dim WI_Num As String 'oooo Variable is instantiatedWI_Num = Me.Overpayment_ 'checked this out with a msgbox, and it shows up kosherDoCmd.RunSQL "SELECT Sum([Payments Table].[Payment Amount]) AS Payment_Sum FROM [Payments Table] WHERE ((([Payments Table].[Overpayment#])=""" & WI_Num & """));" 'OMGWTFBBQ!?! My SQL is a little ugly with all the parens in there'(I cheated and did a design view query, then modded the SQL view - mostly just to get Access' naming convention right)/codeI have checked and re-checked the table names, and field names. I have tried with single, double, and no quotation marks around the WI_Num variable. I have tried making a string and putting the SQL statement in there, then doing the DoCmd.RunSQL mySQLString thing.
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
Select Statement In Vba
the company Business Learn more about hiring developers or posting ads with us Stack ms access openrecordset Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of
Access Vba Run Query
6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up SELECT query does not work when converted to VBA - invalid SQL statement up vote 1 down http://arstechnica.com/civis/viewtopic.php?t=331686 vote favorite I have been struggling with SQL statement when converted to VBA. Basically, I wish to add something to it before executing (which shouldn't be a problem). However, when I try to run it before changes, VBA does not recognize it as a valid SQL statement. Despite trying to add/remove brackets and any other special character, it still does not work. Please note, that it works perfectly when run as a http://stackoverflow.com/questions/27421873/select-query-does-not-work-when-converted-to-vba-invalid-sql-statement query. Please see the string below: SQLstr = "SELECT SourceData.[Fiscal Year], SourceData.[Fiscal Quarter ID], " _ & "SourceData.[Transaction Date], SourceData.[Sales Order Number], SourceData.[Activated?], " _ & "SourceData.[Product ID], SourceData.[Bookings Quantity], SourceData.[Term Length], " _ & "SourceData.[Estimated Expiring Quarter], SourceData.[End Customer Company Name], " _ & "SourceData.[Sold To Company Name] " _ & "FROM SourceData, finalCust, finalPart " _ & "WHERE (((SourceData.[End Customer Company Name]) Like finalCust.[FinalList]) " _ & "And ((SourceData.[Sold To Company Name]) Like finalPart.[FinalList]))" The code is 'pure' SQL into VBA, without any amendments but I don't want to mislead. Here's an error message: Run-time error '2342': A RunSQL action requires an argument consisting of an SQL statement. Which I would consider as unreadable SQL statement for VBA. sql vba ms-access access-vba ms-access-2010 share|improve this question edited Dec 11 '14 at 14:22 HansUp 79.3k114371 asked Dec 11 '14 at 11:32 Kacper Sobociński 84 1 can you post the whole error please –Matt Dec 11 '14 at 11:35 You have included three tables, but no relationship (/JOINS) between them. Why? Could possibly be a reason for your error. –PaulFrancis Dec 11 '14 at 12:05 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted That error message is misleading. The real problem is that DoCmd.RunS
DriverDoc WinSweeper SupersonicPC FileViewPro About Support Contact Errors Troubleshooting › Runtime Errors › Microsoft Corporation › Microsoft Access › Error 2342 How To Fix Microsoft Access Error 2342 Error Number: Error 2342 Error Name:A RunSQL action http://www.solvusoft.com/en/errors/runtime-errors/microsoft-corporation/microsoft-access/2342-a-runsql-action-requires-an-argument-consisting-of-an-sql-statement/ requires an argument consisting of an SQL statement Error Description: A RunSQL action requires an argument consisting of an SQL statement.@For example, an action query that appends records starts with INSERT INTO. A data-definition query that creates a table starts with CREATE TABLE.@@1@1@3698@1. Developer:Microsoft Corporation Software:Microsoft Access Applies to:Windows XP, Vista, 7, 8 Download NowWinThruster 2015 - Scan your PC for computer errors. ms access Compatible with Windows 10, 8, 7, Vista, XP and 2000 Symptoms of Error 2342 "Error 2342" appears and crashes the active program window. Your PC frequently crashes with Error 2342 when running the same program. “A RunSQL action requires an argument consisting of an SQL statement” is displayed. Windows runs sluggishly and responds slowly to mouse or keyboard input. Your computer periodically “freezes” select query in for a few seconds at a time. These 2342 error messages can appear during program installation, while a Microsoft Corporation-related software program (eg. Microsoft Access) is running, during Windows startup or shutdown, or even during the installation of the Windows operating system. Keeping track of when and where your 2342 error occurs is a critical piece of information in troubleshooting the problem. Causes of Error 2342 Corrupt download or incomplete installation of Microsoft Access software. Corruption in Windows registry from a recent Microsoft Access-related software change (install or uninstall). Virus or malware infection that has corrupted Windows system files or Microsoft Access-related program files. Another program maliciously or mistakenly deleted Microsoft Access-related files. Runtime Errors such as “Error 2342” can be caused by a variety of factors, so it is important that you troubleshoot each of the possible causes to prevent it from recurring. Runtime Errors Knowledgebase Article ID: 121121 Article Author: Jay Geater Last Updated: 19-07-2016 Popularity: star rating here Download NowError Fix Learn More Tweet Recommendation: Scan your PC for computer errors. How To Fix Microsoft Access Error 2342 Below is a list of troubl