+ Reply to Thread
Results 1 to 6 of 6

excel macro access update

  1. #1
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    excel macro access update

    Hi all,

    need your help in correcting this code.

    I want to update a field in my access db.

    Please Login or Register  to view this content.
    currently it says syntax error in Update statement.

    Thanks in advance.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: excel macro access update

    From the looks of it, you are missing space between DBForm & SET, also between "'" & WHERE.

    Either add space character before or after line change.
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    Re: excel macro access update

    Hi CK76,

    tried your suggestion but it still error

    but now the error is "Data type mismatch in criteria expression"

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: excel macro access update

    ID fields are usually numeric... Just another guess, about the most that can be done with the information in your post.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: excel macro access update

    Does this work?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  6. #6
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    Re: excel macro access update

    Thanks for your help

    Now working

    Please Login or Register  to view this content.
    My bad forgot to know that ID is always a numeric and not a text.

+ 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. Update Access database from excel worksheet data through SQL in VBA Macro
    By anandagrawal444 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2015, 07:06 AM
  2. trying to update access after data from access is imported to excel
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2015, 04:52 AM
  3. Trying to update an access table from Excel based on unique ID. rst.Update not working
    By Newbie0924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 04:15 PM
  4. import from excel into access to update access, adding or subtracting
    By Tynus in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2014, 01:49 PM
  5. Update records to Access 97 from Excel 97 via macro
    By kennethqiu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2014, 05:47 PM
  6. Update & Append Access Table Using Excel Macro - ADO
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2010, 04:49 AM
  7. [SOLVED] export access to excel. change access & update excel at same time
    By fastcar in forum Excel General
    Replies: 0
    Last Post: 06-24-2005, 05:05 PM

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