Y
Yelena Varshal via AccessMonster.com
Hello,
I have some code in a Module that logs things to a file into the subfolder of
the current folder where the mdb file is. This code worked fine last week and
this Monday creating files in this subfolder but would not work starting
Tuesday telling me that path could not be found. When I removed the
subfolder name from the file name this code worked today and when I searched
where the file was created it was created in My Documents instead of the
folder where the MDB file is. This code is very generic:
' This code worked last week creating a file in the subfolder of the
folder with mdb file
' it can not find a subfolder now, the subfolder is there in the folder.
Dim filenumber As Integer
filenumber = FreeFile
Open "MySubFolder\MyFile.txt" For Output As #filenumber
' This code does work but it creates a file in My Documents instead of the
folder where the mdb file is.
Dim filenumber As Integer
filenumber = FreeFile
Open "MyFile.txt" For Output As #filenumber
Any Ideas?
Thanks
I have some code in a Module that logs things to a file into the subfolder of
the current folder where the mdb file is. This code worked fine last week and
this Monday creating files in this subfolder but would not work starting
Tuesday telling me that path could not be found. When I removed the
subfolder name from the file name this code worked today and when I searched
where the file was created it was created in My Documents instead of the
folder where the MDB file is. This code is very generic:
' This code worked last week creating a file in the subfolder of the
folder with mdb file
' it can not find a subfolder now, the subfolder is there in the folder.
Dim filenumber As Integer
filenumber = FreeFile
Open "MySubFolder\MyFile.txt" For Output As #filenumber
' This code does work but it creates a file in My Documents instead of the
folder where the mdb file is.
Dim filenumber As Integer
filenumber = FreeFile
Open "MyFile.txt" For Output As #filenumber
Any Ideas?
Thanks