Results 1 to 2 of 2
  1. #1
    webisti is offline The Wisher
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    115

    VBA to update to predefined text where is null

    Hi
    I do have a vba code where I am saying check if Description is empty (null) in the query (some items might have empty description but not that many) then insert this text.
    strSQL = "UPDATE booklet_list SET booklet_list.descr = ' book sold ' where booklet_list.descr is null "
    CurrentDb.Execute (strSQL)


    but is not working
    where is my error?

    thanks for your inputs

    Webisti

    SOLVED...MISSING THE END
    ;

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Interesting, I routinely omit the semi-colon from SQL actions and they run fine. I find the semi-colon is critical to SELECT queries for opening recordset.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 9
    Last Post: 07-11-2012, 04:13 PM
  2. Replies: 3
    Last Post: 06-21-2012, 05:25 PM
  3. Update field1 if Null, if Not Null update field2
    By mfirestorm in forum Queries
    Replies: 2
    Last Post: 12-02-2011, 09:51 AM
  4. attachments to predefined directory
    By surfcaster in forum Forms
    Replies: 0
    Last Post: 03-04-2010, 02:22 PM
  5. Replies: 2
    Last Post: 01-22-2010, 03:53 PM

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