Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Unanswered: Trouble creating code to find contacts files

    Hi
    I have converted an Access 2000 database I wrote a while ago. There is a form in there that finds all files held in a specified folder that relates to the contact whose record is open -files are found by the fact that all related files start with the FirstName field, and include pdfs, doc, excel etc...

    At this point I always get the reply "there are no files to be found for contact x" even though I know that there are...

    I have attached a copy of the code here - if anyone can help me please pinpioint where my code is breaking down it would be very much appreciated!
    Thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    This looks like a problem to me:

    Code:
        sFileName = WORD_DOC_PATH & FirstName & "*.*"
        sFNameFound = Dir(WORD_DOC_PATH)
    I think it should be:

    Code:
        sFileName = WORD_DOC_PATH & FirstName & "*.*"
        sFNameFound = Dir(sFileName)
    This code is in the Private Sub loadFileList().

  3. #3
    Join Date
    Oct 2010
    Posts
    2

    Work around

    Thanks - but it didn't change anything..
    I have found a work around though - it qorks as long as individual files aren't kept in a further sub-folder... so (while a bit messier when just look via Explorer) I can jsut keep all my files in one big folder and Access will find them from there.
    Thank you for your efforts though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •