Solved

you are about to append 1 record

Posted on 2002-07-07
3
833 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 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