Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing Date of TXT-file in Database

Status
Not open for further replies.

MiGe

Technical User
Oct 15, 2001
2
0
0
NL
Every day we import the same TXT-files in Approach Database.
Now we want to see the Date of the TXT file in the Database.
Can someone help me to solute this problem.
 
You need to use scipt for this. Look for FileDateTime() in script help.
The only question is where to save the file information.
I'm assuming you want to save it in the database somehow, so what I would do is create a one-record database with two fields, datetime and link. then in the existing database create a field called link (autofilled with 'X') and join the two databases on link.
make sure the field datetime is on the current view when you run the script.
you script would be something like:

Dim fileName As String
fileName$ = "c:\yourfile" 'the name of your file
Currentview.Body.datetime.text = Cstr(Filedatetime(fileName$))

that's one way to do it.
YOu could also put this value into a textbox on the form, but you would have to make sure that the apr was saved each time the script was run (i don't think taht i'd want to do it that way)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top