Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CurrentDb.Execute strSQL    (Has stopped working)

Posted on 2011-10-21
2
Medium Priority
?
482 Views
Last Modified: 2012-05-12
Hi,
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




?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

0
Comment
Question by:Patrick O'Dea
2 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 37007302
CurrentDb.Execute strSQL, dbFailOnError  ' add this - see if error arises
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 37007403
Perfect !
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

810 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