PDA

Click to See Complete Forum and Search --> : how to force?


arnas
Jul 9th, 2000, 01:40 PM
hi! how to force the recordset not to move to the next record, if I check that in the 'rst_WillMove' event user made not valid input?

for example:

Private Sub rst_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If not blnTest then
' something wrong, the record must stay the same !!!
End If
End Sub

*** VB6+Ado ***

thank You !!!

Aldea
Jul 10th, 2000, 03:18 AM
Perhaps this will help.
Private Sub rst_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If not blnTest then
msgbox "Invalid Input"
exit sub
'text1.setfocus
End If
End Sub

arnas
Jul 10th, 2000, 08:08 AM
nope, the solution was to write
"adstatus = adStatusCancel".
thanks!