Thanks Roycefer for your reply
The think that I love about this platform is that there is always somebody happy and ready to help.
I've just started reusing a charting program I purchased a few years ago and I noticed on there forum, that there hasn't been an answer to a post for a number of months. Because I haven't used it for a couple of years I've forgotten a lot of the formula statements so I've made a couple of posts but I'm now not expecting a reply.
I've got this app working working and the change that was needed is really strange, I'll post the change that got it working
The NEW CODE is
trans01Cur = Main.SQL1.ExecQuery("SELECT * FROM Trans01 ORDER BY Portfolio, Stock")
Main.SQL1.BeginTransaction
For i = 0 To trans01Cur.RowCount - 1
trans01Cur.Position = i
If trans01Cur.Position > 0 Then
The OLD CODE is :
trans01Cur = Main.SQL1.ExecQuery("SELECT * FROM Trans01 ORDER BY Portfolio, Stock")
Main.SQL1.BeginTransaction
j = 0
For i = 0 To trans01Cur.RowCount - 1
trans01Cur.Position = i
If j > 0 Then
Weird but it's working now. I've used the j > 0 the make sure I'm not on the first record many times in other apps and never had this problem. It's probably somewhere else in this app as well. I might go thru and change them in case I get the same problem sometime in the future and have forgotten what the answer was.
Thanks again for your help, There was something else that was wrong with the code but it wasn't causing the problem. I''l post it elsewhere because I would have expected the compiler to have picked it up - a stray Next statement
Regards