A
Amduke
Hello all,
hoping to find some solutions over here.
The problem I encounter is that during running the loop trough the recordset
rs_Ord, an error message pops up at record 2366 when I'm at possition:
rs_Spok.Find (SrchStr); indicated with comment.
The error message is: Run-time error '3001':
Arguments are of the wrong type, ar out of acceptable range, or are
inconflict with one another.
Public Sub WriteToRsKokoNoSpok()
'Populate the specified table with data out of the recordset(s)
If rs_Ord.RecordCount > 0 Then
rs_Spok.MoveFirst
tst = rs_Spok.Fields("cart").Value
rs_Ord.MoveFirst
x = 0
y = 0
If rs_Ord.RecordCount > 0 Then
Do Until rs_Ord.EOF
Ord_recpos = rs_Ord.AbsolutePosition
m_Mabc = rs_Ord.Fields("CORARK").Value
m_Koko = rs_Ord.Fields("Koko").Value
rs_Spok.MoveFirst
SrchStr = "[CART] = " & m_Mabc '& " ' "
'Search for article code in SPOK file
rs_Spok.Find (SrchStr) !! Error pops up here at rs_ord
recordno 2336 !!
SPOK_recpos = rs_Spok.AbsolutePosition
If rs_Spok.EOF = True Or rs_Spok.BOF = True Then
'No article found in SPOK, add record to KokoNoSpok file
rs_KNS.Find (SrchStr)
KNS_recpos = rs_KNS.AbsolutePosition
If rs_KNS.EOF = False Then
'No action, article already available CART
Else
'Append new record
rs_KNS.AddNew
rs_KNS.Fields("CART") = m_Mabc
rs_KNS.Fields("KOKO") = m_Koko
rs_KNS.Update
End If
Else
'No action, article already planned in SPOK
End If
rs_Ord.MoveNext
Loop
End If
End If
End Sub
hoping to find some solutions over here.
The problem I encounter is that during running the loop trough the recordset
rs_Ord, an error message pops up at record 2366 when I'm at possition:
rs_Spok.Find (SrchStr); indicated with comment.
The error message is: Run-time error '3001':
Arguments are of the wrong type, ar out of acceptable range, or are
inconflict with one another.
Public Sub WriteToRsKokoNoSpok()
'Populate the specified table with data out of the recordset(s)
If rs_Ord.RecordCount > 0 Then
rs_Spok.MoveFirst
tst = rs_Spok.Fields("cart").Value
rs_Ord.MoveFirst
x = 0
y = 0
If rs_Ord.RecordCount > 0 Then
Do Until rs_Ord.EOF
Ord_recpos = rs_Ord.AbsolutePosition
m_Mabc = rs_Ord.Fields("CORARK").Value
m_Koko = rs_Ord.Fields("Koko").Value
rs_Spok.MoveFirst
SrchStr = "[CART] = " & m_Mabc '& " ' "
'Search for article code in SPOK file
rs_Spok.Find (SrchStr) !! Error pops up here at rs_ord
recordno 2336 !!
SPOK_recpos = rs_Spok.AbsolutePosition
If rs_Spok.EOF = True Or rs_Spok.BOF = True Then
'No article found in SPOK, add record to KokoNoSpok file
rs_KNS.Find (SrchStr)
KNS_recpos = rs_KNS.AbsolutePosition
If rs_KNS.EOF = False Then
'No action, article already available CART
Else
'Append new record
rs_KNS.AddNew
rs_KNS.Fields("CART") = m_Mabc
rs_KNS.Fields("KOKO") = m_Koko
rs_KNS.Update
End If
Else
'No action, article already planned in SPOK
End If
rs_Ord.MoveNext
Loop
End If
End If
End Sub