Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2012, 04:46 PM
Authorized User
 
Join Date: Nov 2011
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default RunTime Error 3075 - Invalid use of '.' , '!', '()'

I have looked this over and over and couldn't seem to find anything....can someone else take a look at this and let me know if you see anything that shines light on why I'm getting this Error?

Code:
    'Create table for Chargeback Non-Reversal
        DoCmd.RunSQL ("DELETE * FROM Chrgback_NonReversal")
        mySQL = "INSERT INTO Chrgback_NonReversal ( [CBVND#], CBTHED, CBTHAM, CBNSRF, CBTHAF, CBNRDT, CBRAMT, CBNRAM, CBCRNO, CBCRSQ, CBCUST, [CBORD#], CBORLN )"
        mySQL = mySQL & " SELECT " & DCFPCBNRDTtemp & ".[CBVND#]," & DCFPCBNRDTtemp & " .CBTHED," & DCFPCBNRDTtemp & " .CBTHAM," & DCFPCBNRDTtemp & " .CBNSRF," & DCFPCBNRDTtemp & " .CBTHAF, " & DCFPCBNRDTtemp & ".CBNRDT, " & DCFPCBNRDTtemp & ".CBRAMT, " & DCFPCBNRDTtemp & ".CBNRAM, " & DCFPCBNRDTtemp & ".CBCRNO, " & DCFPCBNRDTtemp & ".CBCRSQ, " & DCFPCBNRDTtemp & ".CBCUST, " & DCFPCBNRDTtemp & ".[CBORD#]," & DCFPCBNRDTtemp & " .CBORLN  FROM " & DCFPCBNRDTtemp
        
        DoCmd.RunSQL (mySQL)
        Set mySQL = Nothing
Any help would be apreciated. Thanks!
 
Old January 12th, 2012, 07:57 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Looks like in several places you have extra spaces(s) after the table name and before the .fieldname

Code:
...  DCFPCBNRDTtemp & " .CBTHED,"   ...
....................../^\........
Also try adding

Code:
        Debug.Print mySQL    ' print to Immediate Window

        DoCmd.RunSQL (mySQL)
        Set mySQL = Nothing

After running the code go the the Immediate Window (ctrl-g) and copy and paste the SQL line in the the query design in SQL view. Switch to Design view to see what issues you have.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript runtime error '800a000d' error futurehype Classic ASP Professional 20 May 23rd, 2011 10:47 PM
RunTime Error - 2147217900 Invalid SQL Statement; expected 'DELETE' 'INSERT' etc. borenstael Access VBA 4 October 10th, 2010 06:52 PM
Malformed GUID Error runtime 3075 awesomejohn Access VBA 2 October 1st, 2007 08:27 AM
Invalid use of property error. Bob Rupp BOOK: Beginning Access 2003 VBA 1 March 4th, 2005 09:09 AM
Viewstate Invalid Error mahulda ASP.NET 1.0 and 1.1 Basics 0 February 20th, 2004 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.