run-time error 3426

Status
Niet open voor verdere reacties.

comkwek

Gebruiker
Lid geworden
6 mrt 2008
Berichten
167
Hallo,

Ik zit met een probleem. Ik ben aan het programmeren in VB.
Ik kom nu op de run-time error 3426
Met het bijkomende bericht: this action was cancelled by an associated object.

En als ik op debug klik dan gaat hij naar de regel van Data1.Recordset.MoveNext
Data1.Recordset.FindFirst "Datum like '" & DateList.List(ListIndex) & "'"
nummertje = DateList.ListIndex
While teller < nummertje
volgende:
If dingetje < 16 Then
Data1.Recordset.MoveNext <<<<<Regel waar hij vastloopt
dingetje = dingetje + 1
GoTo volgende
End If
dingetje = 0
teller = teller + 1
Wend

'text1
If Data1.Recordset!Practicum = True Then
Text1.Text = "X"
Else: Text1.Text = "O"
End If
If Data1.Recordset!BuitenLokaal = True Then
Text10.Text = "X"
Else: Text10.Text = "O"
End If
Text11.Text = Data1.Recordset!Inschrijving1
Text111.Text = Data1.Recordset!Opmerking1
Text12.Text = Data1.Recordset!Inschrijving2
Text121.Text = Data1.Recordset!Opmerking2
Text13.Text = Data1.Recordset!Inschrijving3
Text131.Text = Data1.Recordset!Opmerking3

Ik kom er niet achter wat de error betekend en wat ik hieraan moet doen om het op te lossen.
Ik laat VB draaien op een access database. Deze gaat met datum's en tijden.
Hebben jullie meer informatie nodig dan hoor ik het wel.
 
error

Dit is de officiele foutmelding.
The Data control was trying to complete an action and a control or object bound to the Data control canceled the action.

This occurs when the user cancels the action. For example, if you place a DBGrid on a form and bound it to the Data control, and then the user sets the Validate event in the Data control to Action = 0. This causes cancellation of the operation. It would also occur if DBGrid's BeforeUpdate event is set to Cancel = 1, canceling the action.
Placing error trapping code in the error event is one way of handling this error.

Meestal gaat het om een verwijzing binnen een database.

Als ik de regels zie. staat de fout regel op de verkeerde plaats.
Je zou de redenatie is anders moeten formuleren.




zoiets dacht ik

Data1.Recordset.FindFirst "Datum like '" & DateList.List(ListIndex) & "'"
nummertje = DateList.ListIndex

Dingetje=1
Do While Not Data1.Recordset.EOF

If dingetje < 16 Then
dingetje = dingetje + 1
Goto stap1:
else
Goto stap2:
End If
Stap1:

Data1.Recordset.MoveNext <<<<<Regel waar hij vastloopt
Stap2:
loop

dingetje = 0
teller = teller + 1
Wend


Dus over de movenext stappen als het niet juist is en anders wel gewoon movenext

mvg mrlittle
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan