Private Sub Form_Load()
Me.username = fOSUserName()
Call Kriter
End Sub
Private Sub Form_Timer()
Me.Metin9.Requery
Call Kriter
End Sub
Sub Kriter()
Dim u1, u2, u3, u4 As Integer
Dim hwnd
Dim StartDoc
hwnd = apiFindWindow("OPUSAPP", "0")
u1 = Dlookup ("[mola1]", "T_MOLA", "[kullanici]=[username]")
u2 = Dlookup ("[yemek]", "T_MOLA", "[kullanici]=[username]")
u3 = Dlookup ("[mola2]", "T_MOLA", "[kullanici]=[username]")
u4 = Dlookup ("[mola3]", "T_MOLA", "[kullanici]=[username]")
If u1 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari1.txt", "", "C:\", SW_SHOWNORMAL)
End If
If u2 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari2.txt", "", "C:\", SW_SHOWNORMAL)
End If
If u3 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari3.txt", "", "C:\", SW_SHOWNORMAL)
End If
If u4 = Time() Then
StartDoc = ShellExecute(hwnd, "open", CurrentProject.Path & "\Uyari4.txt", "", "C:\", SW_SHOWNORMAL)
End If
End Sub
Kodları aşağıdakiler ile değiştirip, veritabanı ile aynı dizine koddaki gibi farklı dosya (Uyarı1.txt, Uyarı2.txt vs.vs.) eklerseniz saate göre farklı dosya açılır.