Advertisement

10.19.2007 at 02:51AM PDT, ID: 22903992
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Run-time error 3021 retrieving bookmark from listview object in Visual Basic 6 compiled program.

Asked by softheart in VB Objects, Visual Basic Programming

Tags: , , , ,

I am using Visual Basic 6 (SP6) on Microsoft Windows 98 2nd Edition with Microsoft DAO 3.6 Object Library.
Inside the source I open a recordset in dynaset mode and assign it to a global variable:
   '
   Global gRsPage as Recordset
   Set gRsPage = gDb.OpenRecordset(strSQL, dbOpenDynaset)
   '
Then I show all records by a ListView Object, assigning at each row a single record data:
   '
   lngRow = 0
   '
   While Not gRsPage.EOF
      lngRow = lngRow +1
      lvwPage.ListItems.Add lngRow, , gRsPage(0)      'Numeric data, ie '93999393'
      '
      lvwPage.ListItems(lngRow).Tag = gRsPage.Bookmark
      '
      gRsPage.MoveNext
   Wend
   '
When the operator click on a ListView row, inside the ItemClick event I get the selected record and show the other record fields:
   '
   Private Sub lvwPage_ItemClick(ByVal Item as MSComctlLib.ListItem)
      '
      If Len(Item.Tag) > 0 Then              
         gRsPage.BookMark = Item.Tag
         '
         *** ShowAllData(gRsPage(1), gRsPage(2), etc.) routine ***
         '
      End If
      '
   End Sub
   '
By Visual Basic IDE interface all run OK but:
   1. when I use the COMPILED program (.EXE);
   2. when, on the first time, I click on the SECOND listview row (the first listview row is selected automatically);
   3. the "Run-time error '3021'. No currend record.' appears when the "gRsPage.BookMark = Item.Tag" instruction is executed.

This error never is shown:
   1. on interpreted version (by IDE);
   2. on listview contains alfanumeric data  ("Mr. Smith") and not only numeric data ("93999393");
   3. clicking on listview rows different from the second (first, third, etc).Start Free Trial
 
Loading Advertisement...
 
[+][-]10.19.2007 at 05:43PM PDT, ID: 20113342

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.19.2007 at 11:37PM PDT, ID: 20113978

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.19.2007 at 11:56PM PDT, ID: 20114010

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.20.2007 at 04:21PM PDT, ID: 20116328

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 01:28AM PDT, ID: 20117261

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 06:10AM PDT, ID: 20117809

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 07:27AM PDT, ID: 20118029

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 07:45AM PDT, ID: 20118093

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 10:17AM PDT, ID: 20118565

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 02:37PM PDT, ID: 20119366

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Objects, Visual Basic Programming
Tags: error, 3021, listview, basic, visual
Sign Up Now!
Solution Provided By: aikimark
Participating Experts: 1
Solution Grade: B
 
 
[+][-]10.21.2007 at 10:56PM PDT, ID: 20121050

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_1_20070628