Sub Run_Export_MISC_BILL_EXTENSION_File()
Dim myDB As DAO.Database
Dim myRS As DAO.Recordset
Set myDB = CurrentDb
Set myRS = myDB.OpenRecordset("qry_Information")
MyFile = "C:\MyDocuments\TextFile.txt"
'Deletes file prior processing
If Len(Dir$(MyFile)) > 0 Then
Kill MyFile
End If
' Loop through all records in table
myRS.MoveFirst
Do Until myRS.EOF
ContractVar = myRS("contract_id")
Open MyFile For Append As #2 'Open file for writing
Print #2, ContractVar
Close #2 'Close the file
myRS.MoveNext
Loop
End Sub