I use the Dir function to retrieve a file list for a certain folder containing files that match a criteria.
Previously I was just using Dir(path & "*.xls", vbNormal) to retrieve excel files. This worked fine but now I want to restrict the criteria a bit. I have used regular expressions in UNIX but I can't seem to figure it out in MS Access. My new Dir syntax is: Dir(path & "#### Agency Items ####-???-##.xls", vbNormal)
I also tried Dir(path & "#### Agency Items ####\-???\-##.xls", vbNormal) incase dashes were special characters but no results still.
From what I understand # is any numeric character and ? is any alphabetic character.
So I would want a filename such as: 0001 Agency Items 2008-Mar-09.xls to match this.
Start Free Trial