I am trying to find all files in a directory form within Access2003 using code. I use the following Dir method.
strFile1 = Dir(FileLoc) ' & " \*.*")
When I check the name stFile1 is set to nothing when there are in fact two file in the directory. I have tried replacing the variable FileLoc with the actual path ("C:\Program Files\Directory 1"). I have also eliminated the *.* both with the same result, strFile1 = Nothing.
Where did I go wrong? Thanks.
strFile1 = Dir(FileLoc) ' & " \*.*")
When I check the name stFile1 is set to nothing when there are in fact two file in the directory. I have tried replacing the variable FileLoc with the actual path ("C:\Program Files\Directory 1"). I have also eliminated the *.* both with the same result, strFile1 = Nothing.
Where did I go wrong? Thanks.