reading date and time atribut from the file

  • Thread starter Thread starter Andy_HR
  • Start date Start date
A

Andy_HR

i have a problem..
i'm trying to make lets say automatic sending of alert to a service
tehnician based on the messagess on answering machine...

i made the first part simple form with on timer event that runs a query that
reads txt file and reades date and times from that log file.. but software
that i have now.. does not write log file in readable format so i have to
read date and time of message from a date and time of the wave file... all
wave files are writen to the same directory lets say c:\inbox ...
now what i would like is to read date and time of creation and if there are
more then 10 wave files in 10 minute span to send an e-mail (e-mail is from
our mobile company that automaticly relays it to a mobile phone of the
tehnician)

is there solution to this?

i was searching thru news grups and help files but i did not find anything
on this ... or i was searching for the wrong things..

this is the code i have now in the form first it runs a query that gets the
number of call and it puts it in a textbox if the number in text box is
greater then 10 then it sends the mail .. its working.. but now the log file
is in wrong format

Private Sub Form_Timer()
Me!br_poziva = DLookup("[Countofdatum]", "broji_poruke", "[test] = 1")
If br_poziva < 10 Then GoTo kraj Else Call test1
kraj:
End Sub
Sub test1()
If br_poziva >= 10 Then Call salji_mail Else GoTo kraj
kraj:
End Sub
Sub salji_mail()
On Error GoTo kraj
DoCmd.SendObject , "", "", (e-mail address removed), "", "", "SERVIS", "U
zadnjih deset minuta je bilo vise od 10 poziva", False, ""
kraj:
End Sub


tnx for any help in advance

-
andy
 
i forgot to post the code for query

first one that reads the data and filters it from the txt file
SELECT Text.datum, Text.sat
FROM [Text]
WHERE (((Text.datum)=Date()) AND ((Text.sat) Between Time()-#12/30/1899
1:10:0# And Time()));

and this one counts

SELECT Count(filter_poruka.datum) AS CountOfdatum, 1 AS test
FROM filter_poruka
GROUP BY 1;
 
i managed to get to count the files but i cant find a way to filter them by
date and time period.. is there a way?
date should always be today and time period 10 minutes.... so i get only
number of files that wore created in 10 minute time frame... or last 10
minutes

Dim broj 'broj = number
Set fs = Application.FileSearch
With fs
.LookIn = "C:\Test"
.FileName = "*.wav"

If .Execute > 0 Then
broj = .FoundFiles.Count
Else
broj = "0"
End If
End With


again tnx in advance...

-
andy
 
Back
Top