Results 1 to 2 of 2
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Check for existance of a file

    I have a file that is generated nightly. Each morning the user will come in and open the DB. I need the file to be automatically imported. Here is my dilemma. The file has the previous day's date on the end (i.e. NewFile_11092010.txt). Instead of trying to calculate weekends and holidays (File is only generated on working business days) I would like to just check for any file with the root of "Newfile_". Part of my import process daily is to archive the file so there will never be more than one file with the same root at my location. Any tips or documentation will be much appreciated!

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Used the "Dir()" function...

    http://office.microsoft.com/en-us/ac...001228824.aspx
    Code:
    Dim varPath
    dim varResult
    varPath = "C:\Path\NewFile_*.txt"
    varResult = Dir(varPath)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-27-2010, 10:10 AM
  2. Replies: 10
    Last Post: 09-27-2010, 07:27 AM
  3. To check or Un-Check all Boxes in a form
    By devcon in forum Forms
    Replies: 7
    Last Post: 05-01-2010, 12:03 AM
  4. Replies: 2
    Last Post: 03-02-2010, 12:02 PM
  5. Upload file inside .mdb database file
    By havish in forum Access
    Replies: 0
    Last Post: 07-30-2008, 07:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums