+ Reply to Thread
Results 1 to 6 of 6

[ADOSQL][VBA] Update information instead of inserting

  1. #1
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Exclamation [ADOSQL][VBA] Update information instead of inserting

    Hey Guys,

    I have a problem regarding modifying the code below instead of inserting new data into an .mdb access file to update the specific row where "ID" = something
    I've tried several times with different types of update codes but it keeps giving me errors even for the simplest update functions such as

    Note : the website firewall blocks me from posting sql commands?
    https://stackoverflow.com/questions/...sing-variables

    If necessary i will upload / attach an .mbd file and a excel file with the specific problem

    Does somebody know where i should re-build the code?

    Explications of the code below:
    2 Ranges of date on 2 separate rows
    The first rows contains the table_columns name and the second one, the values to be updated.

    The 2 rows are prepared then inserted into the specific database.

    Note : the website firewall blocks me from posting sql commands attached file .txt?
    Attached Files Attached Files
    Last edited by alexgoaga; 08-01-2018 at 06:19 AM.

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

    Re: [ADOSQL][VBA] Update information instead of inserting

    Do you have an example Excel workbook?

    Any chance you could upload it?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Re: [ADOSQL][VBA] Update information instead of inserting

    managed to update and come with a viable DB example and workbook

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

    Re: [ADOSQL][VBA] Update information instead of inserting

    Can't have a proper look right now but can I ask you something?

    In the code you refer to db_name?

    Is that actually the name of the table you want to work with rather than the database?

  5. #5
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Re: [ADOSQL][VBA] Update information instead of inserting

    db_name stands for the name of the table found in the .mdb access file.

  6. #6
    Forum Contributor
    Join Date
    04-13-2017
    Location
    Buchares
    MS-Off Ver
    2016
    Posts
    117

    Re: [ADOSQL][VBA] Update information instead of inserting

    Hey guys, I managed to create a perfect way to add the data to my database, attached file with the solved code
    Attached Files Attached Files

+ 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. Replies: 3
    Last Post: 01-14-2015, 03:19 PM
  2. [SOLVED] Mass inserting one piece of information
    By jediknight in forum Excel General
    Replies: 3
    Last Post: 07-07-2013, 09:12 AM
  3. Inserting a formula using VBA when I insert new row information
    By JohnnyBGood in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-19-2012, 09:04 AM
  4. inserting a table of information within a cell
    By Lorelei in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2009, 05:23 PM
  5. Inserting weekly information with a userform
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2008, 01:48 AM
  6. INSERTING INFORMATION IN A CELL
    By WINGCO in forum Excel General
    Replies: 1
    Last Post: 08-08-2006, 06:15 PM
  7. Inserting a row (update)
    By Tom in forum Excel General
    Replies: 2
    Last Post: 02-15-2006, 02:55 PM

Tags for this Thread

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