Hi,
I Have recordset rc1
that reads values from txt file. The fields are rtn
, amt
, name
. Now I get the data from table t_rec
and assigned it to another recordset rc2
. and compare with the recordset rc1
.
If rd1.Fields![AccountNbr] = rc2.Fields![RTProvided] Then
Set rc2.Fields![ClaimStatus] = "c"
rc2.Fields![DateClosed] = CqDate
rc2.Fields![Audit_LastUpdated] = CqDate
rc2.Fields![Audit_UserAdded] = "System"
If i compile that program i am getting errr like Invalid use of property in vb6. Can you help me.
Sub DneFroceClose()
CqDate = Format(Date, "dd/MM/yyyy")
Set rcdreclamation = New ADODB.Recordset
With rcdreclamation
.ActiveConnection = objConn
.Source = "SELECT * FROM T_DATA_reclamation"
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open
End With
frmDNELoad.lblStatus.Caption = "Adding record " & lngRecCount & " of " & rcdreclamation.RecordCount & " to database."
frmDNELoad.Refresh
rcdDNE.Open
rcdreclamation.Open
rcdDNE.MoveFirst
rcdreclamation.MoveFirst
Do Until rcdDNE.EOF
Do Until rcdreclamation.EOF
If rcdDNE.Fields![AccountNbr] = rcdreclamation.Fields![RTProvided] Then
Set rcdreclamation.Fields![ClaimStatus] = "c"
rcdreclamation.Fields![DateClosed] = CqDate
rcdreclamation.Fields![Audit_LastUpdated] = CqDate
rcdreclamation.Fields![Audit_UserAdded] = "System"
Exit Do
Else
rcdreclamation.MoveNext
End If
Loop
rcdDNE.MoveNext
rcdreclamation.MoveFirst
Loop
End Sub