VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Problem with ADO Control Posted by ado on 22 Aug 2000 at 8:54 AM
Hi ,<br>
The scenario is like this , <br>
We can use the Adodc control to move forward or backward to view the records in the database using the left or right arrows embedded with the control. I have set the property of BOF to 0 - adDoMoveFirst and the property of EOF action to<br>
2 - adDoAddNew . Simply with the BOF setting , I will not let the user move beyond the First Record . As for EOF setting , I will allow the user to insert a new record simply by scolling past the end of the queue .The problem occurs when I try to insert the new record through the Adodc control as the method I have mentioned above. At this time , when I have decided to return back to the prior records using my Adodc control by clicking on the left arrow. I will be prompt with this warning message <br>
" Cannot Insert an empty row - must have at least one column value set " . Now I am force to enter some data in the current recordset . Only then will I be able to return back to the prior records. I have no other way out . <br>
<br>
Therefore , may I know would it be possible for me to return back to the prior record. Thanks


Edit Report
Re: Problem with ADO Control Posted by Tom Gueth on 4 Nov 2000 at 7:03 AM
: Hi ,<br>
: The scenario is like this , <br>
: We can use the Adodc control to move forward or backward to view the records in the database using the left or right arrows embedded with the control. I have set the property of BOF to 0 - adDoMoveFirst and the property of EOF action to<br>
: 2 - adDoAddNew . Simply with the BOF setting , I will not let the user move beyond the First Record . As for EOF setting , I will allow the user to insert a new record simply by scolling past the end of the queue .The problem occurs when I try to insert the new record through the Adodc control as the method I have mentioned above. At this time , when I have decided to return back to the prior records using my Adodc control by clicking on the left arrow. I will be prompt with this warning message <br>
: " Cannot Insert an empty row - must have at least one column value set " . Now I am force to enter some data in the current recordset . Only then will I be able to return back to the prior records. I have no other way out . <br>
: <br>
: Therefore , may I know would it be possible for me to return back to the prior record. Thanks<br>
: <br>
<br>
You need to undo (or clear) the new record creation. Some data must be getting into the record and therefore Access has started to create the record but has not added it to the table. WHen you try to go back, Access sees an error most likely with the primary key and is giving you the message. Basically, do the equivalent of the hitting the escape key.<br>
<br>






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.