Results 1 to 4 of 4
  1. #1
    djreyrey is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2009

    Red face ListBox Populate Directory Based On User Input

    Hello! Thank you for your assistance. I apologize for the long post but I want to make sure it's detailed.

    On my Documents form, would it be possible to have a text box where the user enters an order #, clicks a command button and displays the directory (which is the order #) in a listbox?

    Currently, the Main form creates a folder on the computer with the same name as the order # (ID) when a new record is created. For example, if the new order # is 100, the database will create a new folder called 100 after the record is inserted.

    So, once the record and the folder are created, the user will open the Documents form to view documents that are available, enter the order # in a text box, and click a command button. After the command button is clicked, the listbox should pull up the directory based on what the user entered in the text box.

    If the user enters order # (ID) 100 in the textbox, Access will look for directory c:\RealEstate\100 and populate the lisbox with the contents of directory c:\RealEstate\100.

    I appreciate your assistance and hope this post makes sense.

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Here is a demo of something on the lines that you want.

    Firstly is uses the current project folder for its search path. You can change this in code to suit you needs. In this demo you can apply filters if you wish, such as file types by extension name and phrases in file names.

    This revised version allows you to specify a different location by using the browse button.

    One added feature is that once you have populated the list box if you double click on a file it opens the file up in its native software.


  3. #3
    djreyrey is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2009
    Ok great, thank you very much! I will give it a go and see where it takes me.

    Thanks again!

  4. #4
    ldappa is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    i have tried to use the above frmdemo but am getting an error "With Application.Filesearch.

    What does it mean?

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

Similar Threads

  1. Replies: 3
    Last Post: 10-05-2009, 07:22 AM
  2. Replies: 1
    Last Post: 08-14-2009, 03:53 AM
  3. Replies: 0
    Last Post: 06-23-2009, 03:01 PM
  4. Replies: 0
    Last Post: 01-18-2007, 07:07 PM
  5. Set required user input
    By ZeusOsiris in forum Database Design
    Replies: 2
    Last Post: 12-04-2006, 07:13 PM

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