Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2005, 04:14 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default Adding File Explorer to a Form

Hi,

   I have seen this before, I just can't find the controls or code.

   I need to add a file explorer or browser (expandable list) to a form so that users can select a file to associate with a record (image files that will be displayed in a form, and then in a report.) I know this can be done even with a filter so that only .jpg files show up in the list. I would also like to filter the list so that the file names (which start with a valid SSN) will be filtered for the current employee's SSN, and also have a default folder.

   (These are scans of employee records in .jpg format, and I need the user to be able to assocaite and view images of the docs in reocrds, and I want them to only see scans available for the employee on whose record they are at the moment.)

Thanks.


mmcdonal
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old March 1st, 2005, 04:33 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Well, here is what I had to do since I couldn't use the ocx that covers this, and I couldn't find an API:

I have a folder with files that use the patient's ssn as the beginning of the file name.

I created a button on the form that takes the patient's ssn, then loops through the folder where the scanned docs are and pulls only those that start with the patient's ssn.

Then it pushes this data to a temporary table, and opens a continuous form that lists all the files. On the continuous form there is a button next to each record that says Attach this file.

If you click that button, the form closes, the file name and path are pushed to the proper field in the database, and the temporary table is cleared out.

So it is not only an OpenFileDialog box, but it is prefiltered for files pertaining to the patient whose record is being worked on.

It doesn't look to fancy yet, but it will tomorrow.

Thanks for looking in. I hope this helps someone else.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Open ANY file JUST LIKE Windows Explorer? Rizzle-Q VB How-To 4 March 22nd, 2006 10:37 PM
Problem adding a New View in Server Explorer taliesin VS.NET 2002/2003 2 March 21st, 2006 01:10 PM
Run VBA Excel File On Internet Explorer DHDang Excel VBA 0 November 12th, 2003 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.