Yes I have used the code before, it adds a row in table then adds the values into the table.
I have tried what you have suggested but still same error.
I have found that as had no data in table throws this error , as soon as there is data in the first row works ok.
Bookmarks