Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Ok im running a recorset loop to add data to a table but it copys all data exept for the last record here is the code
please help thanks Antwhile not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement4.Update
RsStatement4.MoveNext
wend

If the last line is failing for some reason, VB should produce an error. There are numerous possibilities: A mistyped word. The Amount failed field is miss spelt or doesn't exist. Every time there is a problem like this, VB will generate an error.
It may be that you have your error trapping code is configured in such a way that the error forces a return to the calling routine and the error is reported there. If this is the case, run the application from within the IDE and set it to stop on all errors. The default is to stop on unhandled errors.
Stuart

while not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement4.Update
RsStatement4.MoveNext
wend
should be
while not RsStatement4.EOF
RsStatement5.AddNew
RsStatement5!sellersconcode = RsStatement4!s
RsStatement5!sellersname = RsStatement4!nme
RsStatement5!poconcode = RsStatement4!pv
RsStatement5!poname = RsStatement4!code
RsStatement5!RunFindNo = RsStatement4!run
RsStatement5!Amountpaid = RsStatement4!paid
RsStatement5.Update ' <-- the problem is here
RsStatement4.MoveNext
wendThey mostly come at night...mostly

![]() |
JDBC! I Think?
|
.bat Automatically Overwr...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |