Runtime Error 7874
Display a query? Its a habit I have if something is giving an error that doesn't make sense or I cannot figure out how to fix, I begin a process of purposefully doing some Aug 13 '09 #6 reply Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. strSQL = "USE TEST " & _ "DECLARE @Pointer binary(16), @StringToAppend varchar(100) " & _ "SET @StringToAppend = '...TEST STRING...' " & _ "SELECT @Pointer = TEXTPTR(bin.BITS) " & _ "FROM navigate here
If you really want to do a SELECT, you could use DoCmd.OpenQuery, but I don't think that is the goal in this case. Apparently, DAO/ADO or that whole other lengthy process of creating Querydefs is the only way to create a query on the fly. __________________ Consensus is the lack of leadership Last edited share|improve this answer answered Dec 11 '14 at 14:20 HansUp 79.9k114375 You will need to use OpenRecordset to run the query and access the results. –Rikalous Dec 11 '14 I have tried making a string and putting the SQL statement in there, then doing the DoCmd.RunSQL mySQLString thing.Nada.So, my questions to you, oh great and powerful hivemind are:Does Access choke
Runtime Error 7874
Browse other questions tagged sql vba ms-access access-vba ms-access-2010 or ask your own question. Try this: strSQL = "SELECT Design_Struct.* "& _ "FROM Design_Struct "& _ "WHERE Design_Struct.[DesiID]= "& Me.DesiID.Value &";" 0 I keep getting the above runtime error.
Originally my statement was DoCmd.RunSQL (strSQL) where 'strSQL' was a string variable containing a SQL statement. Connect with top rated Experts 16 Experts available now in Live! You'll be able to ask questions about MS Office or chat with the community and help others. Openrecordset Access Advertisements Latest Threads Mobile phone signals could be blocked in cars Becky posted Dec 19, 2016 at 4:24 PM WCG Stats Monday 19 December 2016 WCG Stats posted Dec 19, 2016
I keep getting the above runtime error. Select Query In Access Vba What are you trying to accomplish with > this code? Click "Edit" in the file menu. http://www.pcreview.co.uk/threads/runtime-error-2342-a-runsql-action-requires-an-argument-consist.1639011/ What are you trying to accomplish with > this code?
Select Query In Access Vba
Dsum(selected field, table, your criteria). http://access-excel.tips/access-docmd-runsql-error-2342/ Thanks much... Runtime Error 7874 Any idea what the > problem is? > > > > Dim strSQL As String > > strSQL = "SELECT zmax2.*, rooting2.* " & _ > > "FROM zmax2 LEFT JOIN A Runsql Action Requires An Argument Consisting Of An Sql Statement asked 2 years ago viewed 1711 times active 2 years ago Blog Stack Overflow Podcast #97 - Where did you get that hat?!
The "AS MaxOfVersione" in your query just creates a column with that title, and you don't do anything with it. check over here Trying to pass in a string homer2002 Modules & VBA 4 06-26-2003 10:37 AM All times are GMT -8. Syntax of DoCmd.RunSQL Method DoCmd.RunSQL(SQLStatement, UseTransaction) SQLStatement A string expression that's a valid SQL statement for an action query or a data-definition query. Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to… Query Syntax Robust Field Cleaning Function Article by: dsacker Run A Select Query In Vba Access
I still get the same error. Stay logged in Welcome to Office Forums! I could CREATE TABLE then DoCmd.RunSQL INSERT ... his comment is here NoYes × Voted Successfully! × You can't vote for yourself × You can't choose your own answer × 419,082 Members | 1,132 Online Join Now login Ask Question Home
mcward316 View Public Profile Find More Posts by mcward316