CurrentDb.Execute strSQL    (Has stopped working)

Posted on 2011-10-21
Last Modified: 2012-05-12
I am building a strSQL string and then executing as follows; CurrentDb.Execute strSQL

I attach the strSQL value but it should be fine as it has worked in the past.  It inserts a record into a table.

However, now the CurrentDb.Execute does NOTHING!  It does not display any error and I have used F8 to step through it.  No sign of any errors but it has suddenly stopped working.

Any thoughts?
MsgBox "before execute"
CurrentDb.Execute strSQL

Insert into tblCustomers(CustomerName,CustomerPhone,CompanyName,Add1,Add2, Add3, PostCode, Email, GeneralComments, ReportedBy, EngineerorsubCONtractor, merchant, windowcount, faultywindowcount,status,recallid,datereported,dateviewed,expectedcompletion) values ("ROBERT GREEN cust - DARREN PURP (recall)", "077100557 ", "", "LEE ROAD, CRATLEY, STETSTOWN", "Backley", "", "", "","***DATE: 26/09/2011                 ***Windows ID Code                       ***PROBLEM:INTEGRAL BLIND STICKING                     ***SERVICE NUM: 2041                   ***NOTES : glass ordered REF Glenn                         *** COMMENTS: ", 1,1,1,0,1,1,188,#10/21/2011 16:43:28#,#10/21/2011 16:43:28#,#11/04/2011 16:43:28#)

Open in new window

Question by:Patrick O'Dea
    LVL 75

    Accepted Solution

    CurrentDb.Execute strSQL, dbFailOnError  ' add this - see if error arises

    Author Closing Comment

    by:Patrick O'Dea
    Perfect !

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now