views:

51

answers:

1

i don't know if this is the standard way to do things, but i will need to take a text file and have it imported into access.

i need access to be always looking (or every minute or so) in a folder, importing the text file, and then automatically printing a report

is this possible?

how do i have access look in a folder every couple of minutes and open a text file if it finds one?

+1  A: 

This is possible. You can use Windows Scheduled Tasks to open up an Access file. You'll need to set a startup form that runs the code that imports the data, prints the form, then closes the application.

If you want VBA to do it, use the Timer event of a form that is open all the time in your Access file. To be a bit more specific, set the Timer Interval property of the form to the number of milliseconds you want it to wait to do the import (1 minute = 60000), then set your Timer event to whatever code you want to run.

KevenDenen
no i want access vba to do the checking, so it should be open all the time
I__
Keep in mind that timer forms can lead to odd UI behavior, and are especially dangerous to a developer doing programming while they are active. Frankly, I'd likely write a VBScript to run from the Windows Task Scheduler to do the job and have that notify the user, if necessary.
David-W-Fenton