please help me with my code.

When I enter the exact filename in the text1.text it will find the filename.dat in my folder.
but it seems the code cant find it even i type the exact filename even the case.

 strBackSlash = IIf(Right$(App.Path, 1) = "\", "", "\")
strEmpFileName = App.Path & strBackSlash & "'" & Text1.Text & "'"
intEmpFileNbr = FreeFile

can u help me? Thanks.

I've never used FreeFile but, if I understand it correctly, it's supposed to return the number of the next file available for FileOpen.

You might try using FileSystemObject.FileExists(strEmpFileName).