Results 1 to 10 of 10
  1. #1
    Terry Lawson is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    23

    Access 2007 Not Running Update Query

    I'm sorry the title is not more explicit, but I don't know what else to say.



    About 2 weeks ago I was receiving the message "Error Loading DLL" when trying to import either Excel or Text files using the "Get External Data" tab from the front window of Access 2070, was unable to find the missing dll's as indicated by the Microsoft tech note.

    I reloaded Office Professional from scratch after removing it, problem seemed to be resolved.

    Today I tried to run a query using the Query Design option from the front Access window, the query is a very simple update for test purposes as I thought I was doing something really stupid :

    Code:
    UPDATE [MERG Suppliers] SET [MERG Suppliers].Test = "YY"
    The table name and the field name are both valid, the field that should be updated is definitely text.

    When I try to run the query nothing at all appears to happen, no error messages and no update.

    Please can somebody give me a clue as to what is not going on.

    Terry Lawson








    Error Loading DLL in Access 2010Error Loading DLL in Access 2010Error Loading DLL in Access 2010Error Loading DLL in Access 2010

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    When I try to run the query nothing at all appears to happen, no error messages and no update.
    Don't have any real suggestions but to be clear, you are executing the query (i.e. clicking the run (!) button, not just using the datasheet view which is effectively just a select query so you see what is currently there. I ask, because others have made the same mistake.

  3. #3
    Join Date
    Feb 2011
    Posts
    23
    Quote Originally Posted by Ajax View Post
    Don't have any real suggestions but to be clear, you are executing the query (i.e. clicking the run (!) button, not just using the datasheet view which is effectively just a select query so you see what is currently there. I ask, because others have made the same mistake.
    Definitely tried with both ! and with right click>open on the query object in the left hand pane of the usual Access window

  4. #4
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,788
    I notice you have no WHERE clause. Maybe not significant but can't say for sure without knowing more. It's not a multi value field or a table with only one record, is it?
    When you go to datasheet view (a preview, in other words) how many empty rows do you see? That is an indicator of how many records will be updated.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Since it is a very simple query, you could try running it from the immediate window (Ctrl-G):

    CurrentDb.Execute "UPDATE [MERG Suppliers] SET [MERG Suppliers].Test = 'YY", dbFailOnError

    Note the single quotes around 'YY'

    Before doing that, turn system messages on with: DoCmd.setWarnings True

    With warnings on, Access will tell you how many rows will be updated by the query when you run it.

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    since this is a simple example, why not upload your db? remove unrequired tables, forms, etc. then compact and zip

  7. #7
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,788
    is there a missing single quote that was described?

    "UPDATE [MERG Suppliers] SET [MERG Suppliers].Test = 'YY'", dbFailOnError

  8. #8
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    is there a missing single quote that was described?
    Oops! Yes, there is - thanks, Micron. I thought I had checked it......!

  9. #9
    Join Date
    Feb 2011
    Posts
    23
    Quote Originally Posted by Micron View Post
    I notice you have no WHERE clause. Maybe not significant but can't say for sure without knowing more. It's not a multi value field or a table with only one record, is it?
    When you go to datasheet view (a preview, in other words) how many empty rows do you see? That is an indicator of how many records will be updated.
    No criteria as I wanted to keep it very simple, not a multi value field and there are 37 records in the table "MERG Suppliers"

  10. #10
    Join Date
    Feb 2011
    Posts
    23
    Quote Originally Posted by Micron View Post
    is there a missing single quote that was described?

    "UPDATE [MERG Suppliers] SET [MERG Suppliers].Test = 'YY'", dbFailOnError
    I'm a real wally!!!
    Query run in immediate window, error message "Macros Not Enabled"
    Macros enabled, query runs perfectly

    Thank you all for your help,obviously a wood for the trees and senior citizen moment!!

    Regards

    Terry Lawson

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 11-13-2015, 05:11 PM
  2. Replies: 0
    Last Post: 04-24-2012, 08:26 AM
  3. [access 2007] Update Query And Function
    By Zoroxeus in forum Queries
    Replies: 4
    Last Post: 04-16-2012, 04:19 PM
  4. Replies: 3
    Last Post: 03-15-2012, 03:42 PM
  5. Running update query in access 2010
    By dbansal in forum Queries
    Replies: 1
    Last Post: 09-03-2010, 10:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums