Home > Syntax Error > Syntax Error In From Clause. Error 3131

Syntax Error In From Clause. Error 3131

Contents

I want when this xl files are imported in TEMP table than super department values should be matched with the same in main table and than if there are any rows Throw an error. It's not going to find one if you pass it an object RE: Run time error '3131' Syntax error in FROM clause nicsin (Programmer) 1 Dec 03 11:20 yes, but usually By joining you are opting in to receive e-mail. navigate here

Also, if your BuildFilter() returns anything it will always leave the string " AND " at the end of your SQL. Jun 29 '07 #1 Post Reply Share this Question 14 Replies 100+ P: 113 LacrosseB0ss Your table name can't have spaces. manix View Public Profile Find More Posts by manix

02-08-2007, 07:49 AM #8 stallyon Registered User Join Date: Feb 2007 Posts: 37 Thanks: 0 Thanked Run your code.

Runtime Error 3131 In Access

Consider... Good luck. MarkK View Public Profile Find More Posts by MarkK 02-08-2007, 07:27 AM #7 manix Newly Registered User Join Date: Nov 2006 Location: Hampshire, UK Good Luck--------------As a circle of light increases so does the circumference of darkness around it. - Albert Einstein RE: Run time error '3131' Syntax error in FROM clause vbajock (Programmer) 1

Open the www.mrexcel.com home page, then try to open another page. The time now is 07:12 PM. Microsoft Access Help General Tables Queries Forms Reports Macros Modules & VBA Theory & Practice Access FAQs Code Repository Sample Databases Video Tutorials Sponsored Office UI Fabric Microsoft Graph Better with Office Word Excel Powerpoint Access Project OneDrive OneNote Outlook SharePoint Skype Yammer Android ASP .NET iOS JavaScript Node.js PHP (coming soon) Python (coming soon) strsql = "Delete from Main " _ & "where [super department] in (select temp.[super department] " _ & "from temp inner join Main on temp.[super department]=Main.[super department])" Andrey V Artemyev |

Are you aComputer / IT professional?Join Tek-Tips Forums! Consider... Andrey V Artemyev | Saint-Petersburg, Russia Edited by VanderghastModerator Tuesday, November 09, 2010 1:12 PM A double quote was apparently missing Marked as answer by Bruce Song Friday, November 12, 2010 It's quick & easy.

My code no looks like this: Code: Private Sub btnSearch_Click() ' Update the record source Me.frmsubToolData.Form.RecordSource = "SELECT * FROM qryTooldata2 WHERE True " & BuildFilter ' Requery the subform Me.frmsubToolData.Requery Please try the following: Load the page again by clicking the Refresh button in your web browser. I have got a couple of other error messages come up but have decided to try another route. Thanks Reply With Quote 06-01-2005,06:55 PM #4 Phil Weber View Profile View Forum Posts Visit Homepage Senior Member Join Date Nov 2003 Location Portland, OR Posts 8,387 Set a breakpoint in

Syntax Error In From Clause Access

RE: Run time error '3131' Syntax error in FROM clause CajunCenturion (Programmer) 1 Dec 03 11:37 [Forms]![Protocol Medications] is not the declaration of an object, it is a reference to an Reply With Quote 06-11-03,08:08 #7 deekay View Profile View Forum Posts Visit Homepage Registered User Join Date Mar 2002 Location Gothenburg, Sweden Posts 3 Thanx for your reply. Runtime Error 3131 In Access Registration on or use of this site constitutes acceptance of our Privacy Policy. Why do the Avengers have bad radio discipline?

I tried the brackets, not working =/ This is my SQL statement: SELECT * FROM order WHERE order.orderno=" & Val(Text1.Text) Best wishes // David Reply With Quote 03-12-02,10:06 #4 PracticalProgram View http://allconverter.net/syntax-error/syntax-error-in-from-clause.html Call Stack? Questions about Access from a .NET/C++ developer "Access Cookbook, Second Edition" Released by O'Reilly Access or FoxPro? I am simply not coversant with VB and therefore my abilities are limited to reviewing what others do and fiddling around with it, learning as I go!

If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! I am not sure how to execute the SQL interactively, sorry for being dim. his comment is here Reply With Quote January 18th, 2008,11:06 AM #4 WoF View Profile View Forum Posts Elite Member Join Date Jul 2006 Location Germany Posts 3,725 Re: VB6 - Run-Time error 3131-Syntax error

Set qdfAction = db.CreateQueryDef("", sSQL) The code for the relevant function is shown below. We apologise for any inconvenience. Jul 3 '07 #11 reply Expert Mod 15k+ P: 29,924 NeoPa I need the answer(result of my query) on the screen.

Code: Private Sub btnSearch_Click() ' Update the record source Me.frmsubToolData.Form.RecordSource = _ "SELECT * FROM qryTooldata2 WHERE True " & BuildFilter ' Requery the subform (this may occur automatically on r-source

RE: Run time error '3131' Syntax error in FROM clause MakeItSo (Programmer) 1 Dec 03 11:09 Nope:Forms![Protocol Medications]![Some text box] could be a text box.but Forms![Protocol Medications] is only the form Thank you! manix View Public Profile Find More Posts by manix « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Display Modes Advanced Search Forum Visual Basic Programming Visual Basic 6.0 Programming [RESOLVED] VB6 - Run-Time error 3131-Syntax error in FROM clause If this is your first visit, be sure to check out

sSQL" (without the quotes) in the Immediate Window, and copy and paste the result into a reply to this post. Does using documentation as a developer make me look unprofessional? I don't want to rename the tables. http://allconverter.net/syntax-error/syntax-error-in-from-clause-c.html Error: A RunSQL action requires an argument consisting of an SQL statement Jun 29 '07 #5 reply Expert 100+ P: 1,206 JKing RunSQL and Execute I believe can only be used

Join Us! *Tek-Tips's functionality depends on members receiving e-mail. Good Luck--------------As a circle of light increases so does the circumference of darkness around it. - Albert Einstein RE: Run time error '3131' Syntax error in FROM clause vbajock (Programmer) 1 GiftX Reply With Quote January 18th, 2008,06:09 PM #6 WoF View Profile View Forum Posts Elite Member Join Date Jul 2006 Location Germany Posts 3,725 Re: [RESOLVED] VB6 - Run-Time error Just one more question please.

My task is to write an event for a command button which creates a query and opens the result for the user in datasheet view. But it is giving me the following error: "Run time error 3265 item not found in this collection". Any ideas on how to handle the table name. Jul 12 '07 #14 reply Expert Mod 15k+ P: 29,924 NeoPa Good for you.

I do not offer free assistance by e-mail. I did set a breakpoint, you're instructions were spot on.