dbTalk Databases Forums  

Creating a record for each tif

comp.databases.ms-access comp.databases.ms-access


Discuss Creating a record for each tif in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
musicloverlch
 
Posts: n/a

Default Creating a record for each tif - 01-15-2009 , 01:51 PM






Dear experts,

This is what my bosses want me to program and I wanted to see if you
thought it was feasible. All the faxes come into a file on the server
as tif files. They want Access to go out to that folder and create a
record for each tif file. Then someone (within Access) will open each
tif and see what it is and assign it to the right person to work on
it. Do you think this sounds doable? How would I start?

Thanks in advance,
Laura

Reply With Quote
  #2  
Old   
Rich P
 
Posts: n/a

Default Re: Creating a record for each tif - 01-15-2009 , 02:40 PM






Hi Laura,

Here is a thought: Use the Dir function to loop through the folder(s)
that contains the tiffs. Store the full filename (the drive
location/folder/filename.tiff) in a record in a table in your mdb.
Then, on a form add an image control. When the user selects a tiff to
look at - display it in the image control by setting the location of
that file which you stored in your table to the source for the image
control.

Note: If there are subfolders - drilling down to the subfolders gets a
little more sophisticated - requires an API function and recursion - to
drill into and out of the subfolders. If all the tiffs are stored in
one folder on your server then don't worry about the drilling down part.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #3  
Old   
Steve
 
Posts: n/a

Default Re: Creating a record for each tif - 01-15-2009 , 06:30 PM



Open a standard or go to the code behind a form. Click on Tools - References
and set a reference to Microsoft Office Document Imaging. Open Windows
Explorer and navigate to a .Tiff file somewhere. Right click on the .Tiff
file and do the following:
Open with,
Choose Program,
Select MODI, (Microsoft Office Document Imaging)
Set "Always use this program...." check box
OK
All .Tiff files will now open with MODI when you click on the file or for
that matter try and open them.

Now you can use automation to open Microsoft Office Document Imaging and
then open any .Tiff file and display it on the full screen.

Steve




"musicloverlch" <lhowey (AT) gmail (DOT) com> wrote

Quote:
Dear experts,

This is what my bosses want me to program and I wanted to see if you
thought it was feasible. All the faxes come into a file on the server
as tif files. They want Access to go out to that folder and create a
record for each tif file. Then someone (within Access) will open each
tif and see what it is and assign it to the right person to work on
it. Do you think this sounds doable? How would I start?

Thanks in advance,
Laura



Reply With Quote
  #4  
Old   
robert.waters
 
Posts: n/a

Default Re: Creating a record for each tif - 01-16-2009 , 06:32 PM



On Jan 15, 7:30*pm, "Steve" <nonse... (AT) nomsense (DOT) com> wrote:
Quote:
Open a standard or go to the code behind a form. Click on Tools - References
and set a reference to Microsoft Office Document Imaging. Open Windows
Explorer and navigate to a .Tiff file somewhere. Right click on the .Tiff
file and do the following:
Open with,
Choose Program,
Select MODI, * *(Microsoft Office Document Imaging)
Set "Always use this program...." check box
OK
All .Tiff files will now open with MODI when you click on the file or for
that matter try and open them.

Now you can use automation to open Microsoft Office Document Imaging and
then open any .Tiff file and display it on the full screen.

Steve

"musicloverlch" <lho... (AT) gmail (DOT) com> wrote in message

news:a1f4a0e6-6509-475d-81bc-3c37e78d27a3 (AT) r36g2000prf (DOT) googlegroups.com...

Dear experts,

This is what my bosses want me to program and I wanted to see if you
thought it was feasible. All the faxes come into a file on the server
as tif files. They want Access to go out to that folder and create a
record for each tif file. Then someone (within Access) will open each
tif and see what it is and assign it to the right person to work on
it. *Do you think this sounds doable? How would I start?

Thanks in advance,
Laura
You could write a small program that monitors the folder that the tiff
files are being added to and inserts a record into your database via
automation or ADO.
Then you create an Access form for the user interface. You could even
use the CDO library from your Access db to send an email to the person
who should be working on the email.

You could probably hack something up in Visual Studio over the
weekend; all of the above can be accomplished with Visual Basic (I
only mention this b/c it is likely that you are familiar with VBA (and
by extension...); I would normally not ever recommend VB for anything
outside of Office

-Robert Waters


Reply With Quote
  #5  
Old   
robert.waters
 
Posts: n/a

Default Re: Creating a record for each tif - 01-16-2009 , 06:40 PM



On Jan 15, 3:40*pm, Rich P <rpng... (AT) aol (DOT) com> wrote:
Quote:
Hi Laura,

Here is a thought: *Use the Dir function to loop through the folder(s)
that contains the tiffs. *Store the full filename (the drive
location/folder/filename.tiff) in a record in a table in your mdb.
Then, on a form add an image control. When the user selects a tiff to
look at - display it in the image control by setting the location of
that file which you stored in your table to the source for the image
control.

Note: *If there are subfolders - drilling down to the subfolders gets a
little more sophisticated - requires an API function and recursion - to
drill into and out of the subfolders. *If all the tiffs are stored in
one folder on your server then don't worry about the drilling down part.

Rich

*** Sent via Developersdexhttp://www.developersdex.com***
Your program would need to continuously recurse through the tiff
folder structure, looking for new items; this would be significantly
resource-intensive). The Windows API provides ReadDirectoryChangesW
for this functionality, which basically hooks into CreateFile and so
only uses resources when a file is created in the directory being
monitored.


Reply With Quote
  #6  
Old   
Salad
 
Posts: n/a

Default Re: Creating a record for each tif - 01-16-2009 , 08:08 PM



musicloverlch wrote:

Quote:
Dear experts,

This is what my bosses want me to program and I wanted to see if you
thought it was feasible. All the faxes come into a file on the server
as tif files. They want Access to go out to that folder and create a
record for each tif file. Then someone (within Access) will open each
tif and see what it is and assign it to the right person to work on
it. Do you think this sounds doable? How would I start?

Thanks in advance,
Laura
Besides what others have written, I would think about a method that
flags the files as processed. Possible options...changing the filename,
changing the extension, or changing the folder.

Let's say all files begin with F (for fax). If you then preceeded the
name with PF (processed Fax) then when searching for new faxes you have
fewer to search for...
or
move processed faxes to another folder
of
change the extension.


Reply With Quote
  #7  
Old   
rquintal@sympatico.ca
 
Posts: n/a

Default Re: Creating a record for each tif - 01-18-2009 , 12:51 AM



On Jan 15, 3:40*pm, Rich P <rpng... (AT) aol (DOT) com> wrote:
Quote:
Hi Laura,

Note: *If there are subfolders - drilling down to the subfolders getsa
little more sophisticated - requires an API function and recursion - to
drill into and out of the subfolders. *

Rich
Actually, you need neither an API function nor recursion, just a do
while loop nested inside another loop. The trick is to put the
directory paths found by the inner loop into an array, and have the
outer loop read from the array each path to be processed.

Bob Q


Reply With Quote
  #8  
Old   
paii, Ron
 
Posts: n/a

Default Re: Creating a record for each tif - 01-19-2009 , 08:02 AM




"rquintal (AT) sympatico (DOT) ca" <bob.quintal (AT) gmail (DOT) com> wrote

On Jan 15, 3:40 pm, Rich P <rpng... (AT) aol (DOT) com> wrote:
Quote:
Hi Laura,

Note: If there are subfolders - drilling down to the subfolders gets a
little more sophisticated - requires an API function and recursion - to
drill into and out of the subfolders.

Rich

Actually, you need neither an API function nor recursion, just a do
while loop nested inside another loop. The trick is to put the
directory paths found by the inner loop into an array, and have the
outer loop read from the array each path to be processed.

Bob Q
I agree you don't need an API function, DIR will do the job.
Why avoid using recursion on a recursive search? The biggest danger of
recursion is getting into a infinite loop and running out of stack space;
which is almost impossible in a directory search. The tricks to avoid
recursion are normally harder to write and slower then recursion.




Reply With Quote
  #9  
Old   
musicloverlch
 
Posts: n/a

Default Re: Creating a record for each tif - 01-21-2009 , 09:53 AM



Turned out to be pretty easy. There is even a KB article about it:
http://support.microsoft.com/kb/158941

I just modified it for my needs.

Thanks again,
Laura

Reply With Quote
  #10  
Old   
robert.waters
 
Posts: n/a

Default Re: Creating a record for each tif - 01-21-2009 , 11:41 AM



On Jan 21, 10:53*am, musicloverlch <lho... (AT) gmail (DOT) com> wrote:
Quote:
Turned out to be pretty easy. There is even a KB article about it:http://support.microsoft.com/kb/158941

I just modified it for my needs.

Thanks again,
Laura
I would recommend against using OLE objects, especially if there are
going to be a large number of them (db bloat).
You are better off saving only a path to the file and then opening it
using Shell().

HTH


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.