Can anybody help me with this problem?
I created a static recordset. When I load a form, I populated the static recordset(rs). All goes well, I was able to add a record in the static recordset. As part of processing, the records in the static recordset are filtered according to certain criteria.
So now, here is the problem. After filtering the static recordset, when I add a record using the statement
below:
rs.addnew
rs![ref_no] = "string VALUE"
.
.
rs![CONVERSION] = 343.00
rs.update
the recordset is not updated. It doesn't add any record in the recordset. What seems to be wrong????
Please help, it's an urgent problem that I need to solve. because part of the module of my project doesn't work.
Below is my source code for creating the static recordset:
Set rs = New ADODB.Recordset
With rs
.Fields.Append "REF_NO", adChar, 10
.Fields.Append "PRSQM", adCurrency
.Fields.Append "LBPPRSQM", adCurrency
.Fields.Append "COMMISSION", adCurrency
.Fields.Append "DISTURBANCE", adCurrency
.Fields.Append "TAXES_EXP", adCurrency
.Fields.Append "OTHERS", adCurrency
.Fields.Append "TOTPRSQM", adCurrency
.Fields.Append "CONVERSION", adCurrency
.CursorType = adOpenKeyset
.LockType = adLockPessimistic
.Open
End With
Below is the code for filtering the data in the recordset:
rs.Filter = "REF_NO = '" & filtervalue & "'"
I created a static recordset. When I load a form, I populated the static recordset(rs). All goes well, I was able to add a record in the static recordset. As part of processing, the records in the static recordset are filtered according to certain criteria.
So now, here is the problem. After filtering the static recordset, when I add a record using the statement
below:
rs.addnew
rs![ref_no] = "string VALUE"
.
.
rs![CONVERSION] = 343.00
rs.update
the recordset is not updated. It doesn't add any record in the recordset. What seems to be wrong????
Please help, it's an urgent problem that I need to solve. because part of the module of my project doesn't work.
Below is my source code for creating the static recordset:
Set rs = New ADODB.Recordset
With rs
.Fields.Append "REF_NO", adChar, 10
.Fields.Append "PRSQM", adCurrency
.Fields.Append "LBPPRSQM", adCurrency
.Fields.Append "COMMISSION", adCurrency
.Fields.Append "DISTURBANCE", adCurrency
.Fields.Append "TAXES_EXP", adCurrency
.Fields.Append "OTHERS", adCurrency
.Fields.Append "TOTPRSQM", adCurrency
.Fields.Append "CONVERSION", adCurrency
.CursorType = adOpenKeyset
.LockType = adLockPessimistic
.Open
End With
Below is the code for filtering the data in the recordset:
rs.Filter = "REF_NO = '" & filtervalue & "'"