I think I may have made things difficult for myself here. I had my data in the format
$CATEGORY(A)
#Material(n)
value
#Material(n)
value
#Material(n)
value
$CATEGORY(B)
#Material(n)
value
#Material(n)
value
etc etc
and was sorting it into two listboxes on form initialise. The user would select a category, this would populate the material listbox. The user could then select a material and the value would be shown.
I wanted this value to be modified (if required) at runtime.
In theory, the same material can exist under several categories, each having a unique value. I can locate the particular material successfully and I've managed to butcher a "solution" together by using
Open "C:\MyFile.dat" For Binary Access Read Write As #DatFile
locating the record, and then using
Put #DatFile, , MyNewValue
which works (for the most part) but I'm getting inconsistent results writing the new value when the length of the new value doesn't match the length of the old value.
Once that part has been accomplished, the user exits back to another form which will then reload and utilise the newly modified (or added) value.
I've been using chr(13) as part of the MyNewValue and sometimes it's successful while other times it adds a sort of bold pipe character to the value. I'm still trying to suss it out.
[cryptic clue] it's for that thing I'm working on Keith [/cryptic]