Results 1 to 6 of 6
  1. #1
    Join Date
    May 2008
    Posts
    3

    Unanswered: VB Access Form To Search A Image File And Print Automatically.

    Does any one has a sample access database that could search a multiple image files in a drive based on data entered in a field as criteria or part of a sting and if found it will print automatically.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Look at the FileSystemObject, there's even an example in the code bank of using the FSO (I believe I might have even created it!)
    George
    Home | Blog

  3. #3
    Join Date
    May 2008
    Posts
    3
    Thank you for your reply. I have opened the FSO zip file that you mentioned but that works on to open the the locations of the files only.

    The scenario of my form is i have three fields and a button

    awb - where i will enter the part of the filename
    path - location of the file after search has been executed.
    imagefrm - where i can preview the image based on the location value of path
    and a button to print if the path is nut null and has value.

    I would appreciate if you could help me on this.

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    This is a very nice (full program) to log any files in any directories/subdirectories of any file type (with an easy way to search) and store those files locations/file names in an Access table (it stores the creation date, foldername, filename, filetype, etc.. and groups them however you want to group them (with any grouping name you give it for that search): ie. Picture Files, Backup Files, Word Files, etc...). For example, you can search a Word document folder (or the entire c: drive) for all *.doc or *.dot files, save them to a category called: Important Word files, and then see those files in a listing (with the complete folder.) Then you could search for a specific word file, or you could search for a specific word directory, or you could search for all word files created that are newer than 01/01/08. You can continually build up the file listing so it will catelog every file on any drive (including network drives). Once you've built up the listing, finding any file of any file type or any date range is a snap. There's so many ways and options this program has that it's definately worth looking at (only because I've found it to be extremely handy in my daily use even though I designed it for another company.)

    You can even click on the file in the listing and it will launch the appropriate program to open it and then open the file (i.e. click on a bmp file and paint will open with the bmp file, click on an MSAccess file and it will open that file in MSAccess, click on a Word file and it will open the file in MSWord.) If it doesn't know the appropriate program to launch (from the associates you've specified in Windows), it will prompt and ask you for the program name to launch it (after it's tried 3 other methods to open the file.)

    You can also click on a file in the listing and send it to your desktop as a shortcut by just clicking on a button.

    There are MANY things this menu system I designed will do (it also does the FSO) and I encourage you and others who haven't tried it out, to give it a test.

    I think the new version has the file sizes stored so you could quickly see the size of any directory which Explorer doesn't do (you have to right-click and then properties to see each folder size in Explorer). Next version I'm going to add a print button to directly print the file (for now though, you can double-click on the file in the listing which will open it and you can then quickly print it.)

    The thing I like best about the program is the way it stores all the file information in fields in the table. The entire folder to the file is stored in one field, the filename is stored in another field, the category (you defined) in another field, the datecreated is stored in another field, etc...etc... This makes it very easy to export the table to an excel sheet or make a report to show all your files categorized or sorted the way you want them to be. For example, you can easily total up the size of all the word files on your entire drive or total all the word files created after 1/1/08 or total all the word files in the MyDefinedCategory.

    The program also keeps track of what files you've launched from the listing and makes a grouping on those files you've launched (Files I Opened). You can then see all the files you've recently opened and the date/times you've opened them.

    There's a few more neat things this program does but check out the link for more info.

    It's located here:
    http://www.dbforums.com/showpost.php...8&postcount=40
    Last edited by pkstormy; 05-18-08 at 21:45.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    May 2008
    Posts
    3
    To PKSTORMY,

    Thank you for the info that you have provided. I have look into that program you created in it's really a nice piece of work.

    Again thank you for your time in this.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    We make it too easy sometimes, eh?
    Nice response Paul
    George
    Home | Blog

Posting Permissions

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