DefFileCreated is an integer variable. The function returns a 0 or a 1. If the file is created successfully (and it is) it goes on and does the second part.

DefFileCreated = CreateFieldDefFile(mRecordset,
"C:\WorkingArea\ContactNotes.ttx", 1)
This second line gives me a runtime error '9' Subscript out of range.
Report.Database.SetDataSource mRecordset, 3, 1