This function i use to copy some values in my continious form
Private Sub keuzeNPDbonnummer_LostFocus()
On Error GoTo Err_handler
Dim rst As Recordset
Dim fld As Field
Dim aantalrecords, xx As Integer
Set rst = RecordsetClone
If IsNull(Me.keuzeNPDbonnummer) Or (Me.keuzeNPDbonnummer.Value) = "" Then GoTo eindesub
aantalrecords = rst.RecordCount
Do While xx < aantalrecords
xx = xx + 1
Me.[NPD Bonnummer] = Me.keuzeNPDbonnummer
Beep
DoCmd.GoToRecord , , acNext
Debug.Print xx
Loop
The problem is the docmd.gotorecord,,acnext
It looks like you can't use that in a loop, am i correct ?
There are for example three record in this form and i want to copy some stuff from a unbound field in these 3 records
But i get the message Can't go to this record (the fields ( NPD Bonnummer) are changed)
All help needed
Thanks and greeting from holland
Private Sub keuzeNPDbonnummer_LostFocus()
On Error GoTo Err_handler
Dim rst As Recordset
Dim fld As Field
Dim aantalrecords, xx As Integer
Set rst = RecordsetClone
If IsNull(Me.keuzeNPDbonnummer) Or (Me.keuzeNPDbonnummer.Value) = "" Then GoTo eindesub
aantalrecords = rst.RecordCount
Do While xx < aantalrecords
xx = xx + 1
Me.[NPD Bonnummer] = Me.keuzeNPDbonnummer
Beep
DoCmd.GoToRecord , , acNext
Debug.Print xx
Loop
The problem is the docmd.gotorecord,,acnext
It looks like you can't use that in a loop, am i correct ?
There are for example three record in this form and i want to copy some stuff from a unbound field in these 3 records
But i get the message Can't go to this record (the fields ( NPD Bonnummer) are changed)
All help needed
Thanks and greeting from holland