Can access read file date?

M

mike_davis

I want to import a text file, but only if the file has been updated. Can
Access 2002 read a file date?
 
R

Rob

I have a database that does something similar to what yo
uare asking.

I have txt files that are FTP'd to a folder using a static
name (Monday's file = monstat.txt, etc.).

When my DB opens, it automatically opens a form that
checks for those files. Using unbound fields, I set their
Control Source as follows:
=FileDateTime("G:\CPR BRANCH\Access Project 2001
\Stats\ftp\monstat.txt")

I then added some other fields to help identify one file
from the next (file size) using a similar method:
Control Source as follows:
=FileLen("G:\CPR BRANCH\Access Project 2001
\Stats\ftp\monstat.txt") & " Kilobytes"

I then have check boxes next to the unbound fields that
the user 'checks' to import the file. A macro then reads
the status of the check boxes and imports the files that
were 'checked' for import.

You can do the same thing for non-static file names by
using other unbound forms to enter the file path and name,
then having the macro read those fields to import the file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top