>I thought if you can see the code, it will be easy to help me out.
>
>This DATABASE.Recordset table has a field("Quantity"). I am looping this table
>and writing to oTable.
>if the quantity in the DATABASE.Recordset.Fields("QUANTITY").Value = 5
>I have to add 5 records to the oTable.
>
> ..snip...
>
> If OrdQuantity > 0 Then
> For RecCount = 1 To OrdQuantity
> oTable.AddNew
> oTable.Fields("ITEM").Value = ItmName
> oTable.Fields("DESC").Value = ItmDESC
> oTable.Fields("QUANTITY").Value = OrdQuantity
> oTable.MoveNext
> Next
> End If
> DATABASE.Recordset.MoveNext
>
Hi Lal,
Where are you updating the recordset? You call oTable.AddNew, populate some fields, but do not update it. You do not need to call oTable.MoveNext at all, as it will not update the data.
Replace the oTable.MoveNext statement with an oTable.Update and you should have it.