Solved

ADO Events ('MoveComplete')

Posted on 2001-07-31
4
527 Views
Last Modified: 2008-02-01
I was wondering if anyone could tell me how to solve this problem.
 
for my college project, for which I am Using VB6, I have set up a few ADO connections from code (i.e. not by selecting the icon in the toolbar).
 
How do I access their events to write code in them particuarly the 'moveComplete' event.
Also am I right in assuming this event executes after record navigation?
 
Thanks
 
Michael
0
Comment
Question by:mgroarty
[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
  • 2
4 Comments
 
LVL 39

Expert Comment

by:appari
ID: 6339134
change your declarations to something like this (form level)

Dim withEvents RS1 as adodb.recordset

then you can access all events connected to recordset object. and MoveComplete event is available with recordset object only not with Connection. and MoveComplete fires after moving the record.

MSDN says

The WillMove method is called before a pending operation changes the current position in the Recordset. The MoveComplete method is called after the current position in the Recordset changes.


0
 
LVL 1

Accepted Solution

by:
shahzad73 earned 125 total points
ID: 6339313
Michael if u want events with the object then u have declare your object with the statement as

Dim WithEvents rec As ADODB.Recordset

Also declare this variable in the General section of the form otherwise u won't be able to see its events if u declare them in any function of the form. now if u access the object drop dowm combobox of the form u will see this object in the list. select this and u will see all events of this object in the other combobox

Shahzad
0
 

Author Comment

by:mgroarty
ID: 6340189
Cheers for the help! Only another 255 probs to fix!!
0
 
LVL 1

Expert Comment

by:shahzad73
ID: 6341317
u welcome

Shahzad
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 93
message box in access 4 55
Access 2013 combo box not working 3 74
Count text color with conditional formating in Excel 4 67
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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