Hi,
Thanks for clarifying ndx and ndx2. But with this While (ndx < dbf.Count + 1) I'm pretty sure you're going to get an out of range exception when accessing dbf(ndx) because dbf index is from 0 to dbf.Count - 1. Have you tried changing it to While (ndx < dbf.Count)?