|
-
Jul 12th, 2000, 05:56 PM
#1
Thread Starter
Hyperactive Member
I want to be able to block the recordset on an ADO control from moving when a boolean value is false (e.g. canMove = False). What event would I put this under, and how would the code look? I have tried several things and can't get it to work at all times.
Thanks
Andrew
-
Jul 12th, 2000, 08:16 PM
#2
Member
If you are using an ADODC data control you can use the WillMove event to capture the pending move and test your condition, setting adStatus to adStatusCancel if false.
You can of course use this same technique for ADO code or a DataEnvironment recordset, although you may have to deal with some errors for these two methods.
------------------------------------------------------------
Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If canMove = False Then
adStatus = adStatusCancel
End If
End Sub
------------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|