Results 1 to 4 of 4

Thread: Inserting Records into a table with VBA (Access)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    27

    Inserting Records into a table with VBA (Access)

    1. How can you insert records into a table without using SQL in MS Access?

    2. How do you know if it is successful or not?

    Some sample code would be nice for a noob like me.

    Thanks,

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Inserting Records into a table with VBA (Access)

    You can import data from another source - text file, Excel, etc
    You can enter data manually, via a form or directly into the table.
    You can open the table & look for your records.
    You can use the query wizard to create a query, which actually uses SQL but does it automatically, you don't have to know any (though you should).
    Tengo mas preguntas que contestas

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    27

    Re: Inserting Records into a table with VBA (Access)

    salvelinus,

    thanks for your response, but I figured out how to do it with DoCMD.runSQL(), but wanted to know if there was a way to do it in code without writing SQL.

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Inserting Records into a table with VBA (Access)

    Yes, that's another way, but still involves SQL, hence the name RunSQL. You're not avoiding SQL that way.
    Tengo mas preguntas que contestas

Posting Permissions

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



Click Here to Expand Forum to Full Width