The one adjustment I'd probably want to make to your code is to store the racedata.txt file location in a table field, viewed and accessed from a Form Field call '[filelocation]'. This is just in case the file location changes. Are you able to advise the coding change to achieve this?
Simple. In the code, just change this line;
strFileName = "C:\YourFolder\racedata.txt"
to;
strFileName = Me![FileLocation]
assuming that [FileLocation] is a field in the record source of the form that the code is attached to. You may have to add quote delimiters if the path in the table field does not include the quotes.
Glad it worked for you.