Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ADO Events ('MoveComplete')

Posted on 2001-07-31
4
Medium Priority
?
531 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 375 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

730 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