<<
Now I could do a search for the lowest file date, and then the lowest file time 
within that group of lowest file dates, and then the lowest filename within the 
lowest file time...but that means 3 searches each time I move a file from the 
scanned files folder to the destination folder. Not a bad solution, but I was 
trying to be efficient.

>>

If you're trying to find the earliest file in the table using three fields, you 
could do:

SELECT TOP 1 Filename FROM FileTable ORDER BY FileDate DESC, FileTime DESC, 
FileName DESC

This will get you the earliest file.  In general, anything you do sorted by one 
column you can also do sorted by three columns in the same command format.  If 
you leave off the "TOP 1" you can cursor through the list in order of oldest to 
newest.

Also, I'd consider storing the date and time in a single DATETIME field, which 
would bring your sorting down to two columns from three.

Finally, depending on what's in the documents you're scanning, your scanner may 
be able to help you out in terms of naming the documents.  I did a project once 
in which the incoming documents had bar codes on them.  The scanner was able to 
read the bar code and use that as part of the file name, making it very easy to 
link the documents up with their original database entries.  If your documents 
are reliably dated in a predictable place it's possible your can get scanning 
software that would create the document file names with the original document 
date, not the scanned document date.

--
Larry

Reply via email to