Why moveComplete event invoked why AddNew is called?

Why moveComplete event invoked why AddNew is called?

Post by Bob Stratto » Mon, 11 Feb 2002 00:53:10



One of the parameters on the MoveComplete event is "adReason" which will
tell you "why" you're there.

If you want, here's a VB Function to translate it to English for you.....

Private Function Get_adReason(adReason As ADODB.EventReasonEnum) As String
Select Case adReason
 Case adRsnAddNew '1
    Get_adReason$ = "Add New"
 Case adRsnDelete '2
    Get_adReason$ = "Delete"
 Case adRsnUpdate '3
    Get_adReason$ = "Update"
 Case adRsnUndoUpdate '4
    Get_adReason$ = "Undo Update"
 Case adRsnUndoAddNew '5
    Get_adReason$ = "Undo Add New"
 Case adRsnUndoDelete '6
    Get_adReason$ = "Undo Delete"
 Case adRsnRequery '7
    Get_adReason$ = "ReQuery"
 Case adRsnResynch '8
    Get_adReason$ = "ReSync"
 Case adRsnClose '9
    Get_adReason$ = "Close"
 Case adRsnMove '10
    Get_adReason$ = "Move"
 Case adRsnFirstChange '11
    Get_adReason$ = "First Change"
 Case adRsnMoveFirst '12
    Get_adReason$ = "Move First"
 Case adRsnMoveNext '13
    Get_adReason$ = "Move Next"
 Case adRsnMovePrevious '14
    Get_adReason$ = "Move Previous"
 Case adRsnMoveLast '15
    Get_adReason$ = "Move Last"
 Case Else
    Get_adReason$ = "Reason unknown"
End Select
End Function


Quote:> Does anybody know why? Then how do I differientiate
> between regular
> moveComplete and moveCompleted invoked by AddNew?

> Thanks
> Pat

 
 
 

1. OnUpdateRecord-Event gets not called - WHY??

Hi all!
When I try to catch a OnUpdateRecord-Event of an DataSoucre (Table or
Query) to call a UpdateSQL-object, the event seems not to happen, but
the update takes place!!! (it is a query on 2 tables, so it is
requestlive, the updateobject is NOT set, and still this happens). Any
suggestions or other ways to realize a updateable query on 2 or more
tables? Thanks in advance,
Achim

2. how to determine cause of deadlock

3. SELECT query in Access97 to SQL 6.5 returning wrong records - why Why WHY

4. refreshing a web page after selecting an option.

5. documentation on COM.ibm.db2.jdbc package

6. WHY WHY WHY!!!!

7. HELP! access database through excel

8. Why why why?? help please

9. NET8 TCP/IP connection invokes phone dialer--why?

10. Why was crash recovery invoked?

11. Newbie: Why can't I AddNew