Solved

you are about to append 1 record

Posted on 2002-07-07
3
782 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

773 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