Don't understand that. Thought you said it worked for you when using a wild card. Worked for me.Still have to grab each file by its full name, including the appropriate extension
Don't understand that. Thought you said it worked for you when using a wild card. Worked for me.Still have to grab each file by its full name, including the appropriate extension
It works just to check if any files exist in folder using Dir() function. But if you want to do something with each file in that folder, such as attach to an email, have to address each by full name. Allen's code shows how to do that dynamically.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Agree with that in principle, but OP stated it doesn't matter what the extension is, there will only be 1 file of any 1 name so there is no "each file". If what you or I posted isn't working, then i think it's time for me to back off until the code is posted as we requested.
If only one file meets the function parameters then only one file will be grabbed. But to do this dynamically requires looping through the files and test each file name matches the parameters.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Solution in duplicate thread https://www.accessforums.net/showthread.php?t=72152
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.