Solved

you are about to append 1 record

Posted on 2002-07-07
3
806 Views
Last Modified: 2008-03-04
Hi guys,

in my application VBC, I use the SQL statement "Insert into tableName...." in a loop. So each time this statement is executed I get a messge box saying that you are about to append 1 row. Are you sure ......

Imagine that if I have 1000 records to be appended using the previous code, I will be forced to answer with yes for all 1000 records appended.

How can I prevent this message from appearance, and make Access append the records without getting user confirmation.

Cheers,
0
Comment
Question by:HaryMary
3 Comments
 
LVL 7

Accepted Solution

by:
ildc earned 200 total points
ID: 7135092
Hy harymary,

Just try to put this one in your code

DoCmd.SetWarnings False

and put it back to true in your errortracking at the end,
otherwise it will stay disactivated.

But shouldn't you better use a recordset instead, or create a append query who adds all the records at the same time ?

Regards
0
 
LVL 28

Expert Comment

by:TextReport
ID: 7135121
Hi, Following on from PAQ 20320238 use the AddNew method of a recordset rather than executing the SQL statement. If you insist on the SQL statement then it is as ildc said.

Cheers, Andrew
0
 
LVL 1

Author Comment

by:HaryMary
ID: 7135455
Thanks very much Andrew and Ildc.
Since Ildc answered my question firs, I will give him the points.

Cheers,
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question