M
Maracay
Hi guys,
I have this code, basically what I want is to move from my actual recordset
(rs) to the table "tblMainDataAnalysis†some data, this is my code but I keep
getting the error “Object Requiredâ€, but doesn’t specify in what line is the
error been generated, if someone knows what is this about I will appreciate
it.
Thanks
Private Sub CommAnalyze_Click()
On Error GoTo Err_handler
Dim rs As Recordset
Dim rsa As Recordset
Set rs = Recordset
Set rsa = db.OpenRecordset("tblMainDataAnalysis", dbOpenDynaset)
rs.MoveFirst
Do Until rs.EOF
nLenAddress = Len(address)
nLenAddress2 = Len(address2)
nLenAddress3 = Len(address3)
If nLenAddress > 60 Or nLenAddress2 > 60 Or nLenAddress3 > 60 Then
MsgBox Nz(nLenAddress)
MsgBox Nz(nLenAddress2)
MsgBox Nz(nLenAddress3)
rsa.AddNew
rsa!AnalysisID = 1
rsa!RecordNumber = ListOrder
rsa!address = address
rsa!address2 = address2
rsa!address3 = address3
rsa.Update
rsa.Bookmark = rsa.LastModified
End If
rs.MoveNext
Loop
sExit:
Set rst = Nothing
Me.Requery
Exit Sub
Err_handler:
MsgBox Err.Description
I have this code, basically what I want is to move from my actual recordset
(rs) to the table "tblMainDataAnalysis†some data, this is my code but I keep
getting the error “Object Requiredâ€, but doesn’t specify in what line is the
error been generated, if someone knows what is this about I will appreciate
it.
Thanks
Private Sub CommAnalyze_Click()
On Error GoTo Err_handler
Dim rs As Recordset
Dim rsa As Recordset
Set rs = Recordset
Set rsa = db.OpenRecordset("tblMainDataAnalysis", dbOpenDynaset)
rs.MoveFirst
Do Until rs.EOF
nLenAddress = Len(address)
nLenAddress2 = Len(address2)
nLenAddress3 = Len(address3)
If nLenAddress > 60 Or nLenAddress2 > 60 Or nLenAddress3 > 60 Then
MsgBox Nz(nLenAddress)
MsgBox Nz(nLenAddress2)
MsgBox Nz(nLenAddress3)
rsa.AddNew
rsa!AnalysisID = 1
rsa!RecordNumber = ListOrder
rsa!address = address
rsa!address2 = address2
rsa!address3 = address3
rsa.Update
rsa.Bookmark = rsa.LastModified
End If
rs.MoveNext
Loop
sExit:
Set rst = Nothing
Me.Requery
Exit Sub
Err_handler:
MsgBox Err.Description