Results 1 to 2 of 2
  1. #1
    fritesmodern is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    13

    Using the OPENFILENAME structure to set a filter

    How can I use the OPENFILENAME structure to create a filter including and excluding certain keywords?. This could be an example. "*KEYWORD1*.pdf" excluding results containing KEYWORD2; This filter would retrieve all the pdf documents containing the KEYWORD1 keyword in their name excluding all those files containing the KEYWORD2 keyword in their name. Is there any way to make this filter case sensitive?



    Let me emphasize that I would like to use the OPENFILENAME for this purpose since I already have a subroutine which uses this function. However I am open to other alternatives if the OPENFILENAME cannot do the job.

    Thanks for your help.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I do not have experience using OPENFILENAME, but I will guess using wildcards for file name parts is not an option. You will probably be limited to a Filter of file extensions. So you could filter for *.PDF and enumerate all the names of the PDF files within a given folder. As you iterate the names of the filtered PDF files you could check to see if your string exists using the InStr() function, Left() function, etc.

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

Similar Threads

  1. DB structure
    By frons in forum Database Design
    Replies: 4
    Last Post: 04-24-2015, 11:21 PM
  2. DB Structure
    By drkepyon in forum Database Design
    Replies: 6
    Last Post: 08-14-2014, 12:11 PM
  3. Table Structure
    By ccordner in forum Database Design
    Replies: 22
    Last Post: 01-17-2012, 03:22 PM
  4. How to structure my db?
    By JeredG in forum Access
    Replies: 5
    Last Post: 11-14-2011, 06:22 PM
  5. Help with Database Structure
    By scottay in forum Access
    Replies: 8
    Last Post: 06-30-2010, 08:16 AM

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