Hi,
I have a ListBox filled with data, notably a Date Start (as SQLDate) and a Source Text File who also holds that Date Start (as SQLDate).
The ListBox contents have been generated by the software while the Source Text file was man made.
I want to merge both data and I use the minimum commondata: the Date Start value.
This would works (what I already have) fine using Sunday Dates only (probably, not sure), the date flow from Monday to Saturday (then skip SUnday) in both ListBox and Source Text.
What Ive done is:
In a loop: (While Not t.EOF
/
Wend)
I read the ListBox (the Date Start column)
I read one line from the Source Text file
I compare the Date Start (from the ListBox) to the Date Start (from the Source Text file).
If not found, I increment this sub-loop and check once more
When found, I add the sub-loop index to the main index for the newt Date Start
For the first date, it works fine, so I assume the trouble i not there.
After the first run, I realized why it does not worked: I had to search in the ListBox the next Date Start, several Rows later (since the next one cannot be in the Source TEXT file, but I have to determine it by code: the lenth [number of Mon-Sat is unknow and can vary ]).
So, I added a simple For / Next loop to search the next occurence (next Date Start in the ListBox that matches the one in Source Text file).
I wasted hours yesterday to nowhere and I get no new idea at woke up time today.
Can you:
tell me if my ideas flow description above can be correct (or f you see an error),
give me advice to a better approach to resolve the synchronisation process ?
In the mean time, I will try to draw (symbolic process with a pen on a sheet of paper) the process and try to discover what was running wrong.
Thanks.
PS: right now (just like yesterday), the design (expressed above) seems to be OK: but Xojo says: “Niet !”
I forget to say that both data hold mostly different data, but that complements each one to the other and so it is a merge of the two data (better be done by the computer than by the man).
In the data writing process, I modify a Cell only if it is empty. I commented that part out for the testings - writing only in a know empty column a report value (the general Loop Indice as a debug process).