Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington (Greater Manchester area)/Cheshire, UK
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting data into a table

    Background:
    I am using Office 2000 and I'm pretty new to Access 2000 VBA section.
    I have a batch of data in an Excel spreadsheet, which I want to place into an Access Table.

    In Access, I have got the code correct to gain access to the data in the spreadsheet and a SQL command to enter the data into the table. The SQL command is as follows:

    DoCmd.RunSQL "INSERT INTO PersonalAdvices (xxx, yyy, zzz) VALUES (xxx, yyy, zzz)" , A_NEWREC
    (Or some syntax very close to it - either way, it works)

    Problem:
    It requests a Yes/No confirmation for each record that is being inserted.

    Question:
    Is there a way to suppress/bypass/set the Yes/No confirmation? Or is there another method, which does the same thing?

    (There are over 1300 records, which will be needed to be inserted into the table).

    Thanks for the help so far!

    James

  2. #2
    Lounger
    Join Date
    Feb 2001
    Location
    TX, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting data into a table

    docmd.setwarnings false
    DoCmd.RunSQL "INSERT INTO PersonalAdvices (xxx, yyy, zzz) VALUES (xxx, yyy, zzz)" , A_NEWREC
    docmd.setwarnings true

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington (Greater Manchester area)/Cheshire, UK
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting data into a table

    Thanks for the quick reponse and the code!

    It will work perfectly - thanks!

    (And I can't believe that its so simple and that I missed it!)

    James

Posting Permissions

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