Consulting

Results 1 to 5 of 5

Thread: Update Access table from Excel

  1. #1

    Update Access table from Excel

    Hello,
    I connected my Excel to Access table (table name : "Main") and when i enter to OLE DB window i can see my sql query ("select * from main;").
    I would like to know how can i insert new row (from Excel) to my Access table.
    I tried this : "insert into main (code, sum) values (10 , 18);" but this does'nt work.

    I have already action query in Access but i don't know how to run this query from Excel.

    Someone maybe knows what the code?

    Thanks.

  2. #2
    VBAX Regular
    Joined
    Oct 2004
    Location
    Belgium
    Posts
    25
    Location
    Hi is the code field a textfield or a numeric field?

  3. #3
    Hi,
    Only text fields.

  4. #4
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    INSERT INTO Table1 (Field1,Field2,Field3,Field4,Field5)
    SELECT Table2Excel.[Field1], Table2Excel.[Field2], Table2Excel.[Field3], Table2Excel.[Field4], Table2Excel.[Field5]
    FROM Table2Excel;

    Should work from Linked Excel table in Access.
    Do you still want to run the query from Excel though?
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  5. #5
    Hi

    I will try this and yes i would like to be able to run the query from Excel.

    Thanks :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •