Results 1 to 2 of 2
  1. #1
    detlion1643 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    5

    Inserting/Updating

    I am writing some vba code in excel to insert/update rows in an access table. I've done queries into access through excel before, but can't for the life of me figure out the proper way to write this query.
    I need to test if a productid exists in the table and if it does update the row with values, if it doesn't exist, then insert a new row with values.
    I have SQL code from a vb.net program I wrote a while ago that does this, but of course access SQL is pretty picky. A query with an access udf won't work or I would have done that (since this is run from excel).

  2. #2
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140
    I am clueless on how to write VBA in Excel.
    However, if for some reason, you are unable to find a solution...I have written an extensive Tutorial in the Forums on how to accomplish this via a Macro (launched from a Command Button's OnClick Even on a Form).

    To view the Tutorial, Click here.

    -RC

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

Similar Threads

  1. Inserting a Report into a Form
    By James3mc in forum Forms
    Replies: 2
    Last Post: 11-18-2009, 08:27 PM
  2. Inserting Comment on a cell??
    By yotapower10 in forum Access
    Replies: 6
    Last Post: 06-29-2009, 08:20 AM
  3. Inserting a picture
    By Carenas in forum Forms
    Replies: 0
    Last Post: 01-03-2009, 05:09 PM
  4. Inserting data through forms
    By nivi30 in forum Forms
    Replies: 1
    Last Post: 12-17-2008, 07:57 AM
  5. inserting bound pictures
    By inquisitive in forum Access
    Replies: 1
    Last Post: 01-09-2006, 09:59 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