+ Reply to Thread
Results 1 to 5 of 5

Problem executing SQL Statement

  1. #1
    Registered User
    Join Date
    04-07-2016
    Location
    Lincoln
    MS-Off Ver
    2010
    Posts
    27

    Problem executing SQL Statement

    Hi all,

    I have a sql string that I am trying to run in my access database. It runs without any errors, but the table in question is not being updated. Can anyone shed any light into where I have gone wrong? All of the variables being used have been declared as string except UPDFE which is declared as long.

    I have attached the statement as a text file as I was unable to post directly in this thread.

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    7,230

    Re: Problem executing SQL Statement

    You've got UPSAP twice in the list of field names. Do you by any chance have an On Error statement in your code?
    Rory

  3. #3
    Registered User
    Join Date
    04-07-2016
    Location
    Lincoln
    MS-Off Ver
    2010
    Posts
    27

    Re: Problem executing SQL Statement

    Hi, thank you for the speedy reply - I didn't see the duplicate - thank you.
    I only have on error resume next in this sub (mainly for a previously loop - the code does not error at all, it just will not update the table?

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    7,230

    Re: Problem executing SQL Statement

    You won't see any errors if you have On Error Resume Next in the code. Why is it there?

  5. #5
    Registered User
    Join Date
    04-07-2016
    Location
    Lincoln
    MS-Off Ver
    2010
    Posts
    27

    Re: Problem executing SQL Statement

    Hi there, I have put the errorhandler in now and am picking up the runtime erro, thank you very much for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF Statement not executing
    By marshallmr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-18-2018, 07:39 PM
  2. Issue With Executing Macros Within Macro, If Statement
    By EnergyHOU in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2016, 02:37 PM
  3. [SOLVED] Macro Ends Sub After Executing If Statement
    By pranskius in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-28-2014, 02:30 PM
  4. [SOLVED] If OR statement not executing properly
    By irfanparbatani in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-02-2013, 02:46 AM
  5. [SOLVED] Nested IF only executing first loop statement
    By kewcumber in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2012, 03:51 PM
  6. Problem executing sub within a sub
    By ArtZ in forum Excel Programming / VBA / Macros
    Replies: 46
    Last Post: 07-31-2008, 12:14 PM
  7. How to force Excel to complete one statement before executing othe
    By vrk1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2005, 03:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1