Solved

you are about to append 1 record

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now