04/01/2010, 20:43
RoxorLoops
Şimdiden Teşekkürler Ufak Bir Açıklama yeter
Option Compare Database
Private Sub Form_Activate()
Seans = Null
Seans_AfterUpdate
Koltuk = Null
Tarife = Null
Ucret = Null
BiletNo = Null
Aciklama = Null
Seans.SetFocus
Seans.Requery
Koltuk.Requery
Tarife.Requery
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.SelectObject acForm, "Bilet", True
DoCmd.Minimize
Resim16.Picture = Empty
End Sub
Private Sub Koltuk_DblClick(Cancel As Integer)
DoCmd.OpenForm "Koltuklar"
End Sub
Private Sub Seans_AfterUpdate()
TarihSaat = Format(DLookup("Tarih", "Seanslar", "SeansNO=Seans"), "dd mmmm yyyy")
Saat = Format(DLookup("Saat", "Seanslar", "SeansNO=Seans"), "hh:nn")
FilmAdı = Dlookup ("TRAdı", "Seanslar", "SeansNO=Seans")
SalonNoAd = Dlookup ("SalonNO", "Seanslar", "SeansNO=Seans") & " - " & Dlookup ("SalonAdı", "Seanslar", "SeansNO=Seans")
Koltuk_Etiket.Caption = "Koltuk * (" & Dlookup ("SaySrNO", "KoltukBosToplam") & "boş)"
On Error GoTo Hata
Dim PaTaTes
PaTaTes = CurrentProject.Path & "\Afis\" & FilmAdı & ".jpg"
If IsNull(Seans) Then
Resim16.Picture = Empty
Else
Resim16.Picture = PaTaTes
End If
Tarife = IIf(IsNull(Tarife), Dlookup ("VarsayilanTarife", "Seans", "SeansNO=Seans "), Tarife)
Ucret = IIf(IsNull(Ucret) Or Ucret = 0, Dlookup ("VarsayilanFiyat", "Seans", "SeansNO=Seans "), Ucret)
Koltuk.Requery
Koltuk.SetFocus
Cikis:
Exit Sub
Hata:
Resim16.Picture = Empty
Resume Cikis
End Sub
Private Sub Komut24_Click()
'On Error GoTo Err_Komut24_Click
If IsNull(Seans) Then
MsgBox "Lütfen Seans 'ı belirtiniz.", , Baslik
Seans.SetFocus
Else
If IsNull(Koltuk) Then
MsgBox "Lütfen Koltuk 'u belirtiniz.", , Baslik
Koltuk.SetFocus
Else
If IsNull(Tarife) Then
MsgBox "Lütfen Tarife 'yi belirtiniz.", , Baslik
Tarife.SetFocus
Else
If IsNull(Ucret) Then
MsgBox "Lütfen Tarife 'yi belirtiniz.", , Baslik
Ucret.SetFocus
Else
DoCmd.RunSQL "INSERT INTO Bilet (Seans,Koltuk,Tarife,Ucret,BiletNO,Aciklama) " & _
"SELECT Seans,Koltuk,Tarife,Ucret,BiletNO,Aciklama"
DoCmd.OpenReport "BiletRapor", acViewPreview
Seans = Null
Seans_AfterUpdate
Koltuk = Null
Tarife = Null
Ucret = Null
BiletNo = Null
Aciklama = Null
Seans.SetFocus
End If
End If
End If
End If
Exit_Komut24_Click:
Exit Sub
Err_Komut24_Click:
MsgBox Err.Description
Resume Exit_Komut24_Click
End Sub
Private Sub Seans_DblClick(Cancel As Integer)
' DoCmd.Close
DoCmd.OpenForm "Seanslar"
End Sub
Private Sub Tarife_AfterUpdate()
Ucret = Dlookup ("Ucret", "FiyatListesi", "FiyatNO=Forms!Bilet!Tarife")
End Sub
Private Sub Tarife_DblClick(Cancel As Integer)
DoCmd.OpenForm "Fiyatlar"
End Sub
Private Sub Ucret_DblClick(Cancel As Integer)
DoCmd.OpenForm "Fiyatlar"
End Sub
Private Sub Komut25_Click()
On Error GoTo Err_Komut25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Seanslar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut25_Click:
Exit Sub
Err_Komut25_Click:
MsgBox Err.Description
Resume Exit_Komut25_Click
End Sub
Private Sub Komut26_Click()
On Error GoTo Err_Komut26_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Film"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut26_Click:
Exit Sub
Err_Komut26_Click:
MsgBox Err.Description
Resume Exit_Komut26_Click
End Sub
Private Sub Komut27_Click()
On Error GoTo Err_Komut27_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Koltuklar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut27_Click:
Exit Sub
Err_Komut27_Click:
MsgBox Err.Description
Resume Exit_Komut27_Click
End Sub
Private Sub Komut28_Click()
On Error GoTo Err_Komut28_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Fiyatlar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut28_Click:
Exit Sub
Err_Komut28_Click:
MsgBox Err.Description
Resume Exit_Komut28_Click
End Sub
Private Sub Komut29_Click()
On Error GoTo Err_Komut29_Click
DoCmd.Quit
Exit_Komut29_Click:
Exit Sub
Err_Komut29_Click:
MsgBox Err.Description
Resume Exit_Komut29_Click
End Sub
Private Sub Komut30_Click()
On Error GoTo Err_Komut30_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut30_Click:
Exit Sub
Err_Komut30_Click:
MsgBox Err.Description
Resume Exit_Komut30_Click
End Sub
Option Compare Database
Private Sub Form_Activate()
Seans = Null
Seans_AfterUpdate
Koltuk = Null
Tarife = Null
Ucret = Null
BiletNo = Null
Aciklama = Null
Seans.SetFocus
Seans.Requery
Koltuk.Requery
Tarife.Requery
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.SelectObject acForm, "Bilet", True
DoCmd.Minimize
Resim16.Picture = Empty
End Sub
Private Sub Koltuk_DblClick(Cancel As Integer)
DoCmd.OpenForm "Koltuklar"
End Sub
Private Sub Seans_AfterUpdate()
TarihSaat = Format(DLookup("Tarih", "Seanslar", "SeansNO=Seans"), "dd mmmm yyyy")
Saat = Format(DLookup("Saat", "Seanslar", "SeansNO=Seans"), "hh:nn")
FilmAdı = Dlookup ("TRAdı", "Seanslar", "SeansNO=Seans")
SalonNoAd = Dlookup ("SalonNO", "Seanslar", "SeansNO=Seans") & " - " & Dlookup ("SalonAdı", "Seanslar", "SeansNO=Seans")
Koltuk_Etiket.Caption = "Koltuk * (" & Dlookup ("SaySrNO", "KoltukBosToplam") & "boş)"
On Error GoTo Hata
Dim PaTaTes
PaTaTes = CurrentProject.Path & "\Afis\" & FilmAdı & ".jpg"
If IsNull(Seans) Then
Resim16.Picture = Empty
Else
Resim16.Picture = PaTaTes
End If
Tarife = IIf(IsNull(Tarife), Dlookup ("VarsayilanTarife", "Seans", "SeansNO=Seans "), Tarife)
Ucret = IIf(IsNull(Ucret) Or Ucret = 0, Dlookup ("VarsayilanFiyat", "Seans", "SeansNO=Seans "), Ucret)
Koltuk.Requery
Koltuk.SetFocus
Cikis:
Exit Sub
Hata:
Resim16.Picture = Empty
Resume Cikis
End Sub
Private Sub Komut24_Click()
'On Error GoTo Err_Komut24_Click
If IsNull(Seans) Then
MsgBox "Lütfen Seans 'ı belirtiniz.", , Baslik
Seans.SetFocus
Else
If IsNull(Koltuk) Then
MsgBox "Lütfen Koltuk 'u belirtiniz.", , Baslik
Koltuk.SetFocus
Else
If IsNull(Tarife) Then
MsgBox "Lütfen Tarife 'yi belirtiniz.", , Baslik
Tarife.SetFocus
Else
If IsNull(Ucret) Then
MsgBox "Lütfen Tarife 'yi belirtiniz.", , Baslik
Ucret.SetFocus
Else
DoCmd.RunSQL "INSERT INTO Bilet (Seans,Koltuk,Tarife,Ucret,BiletNO,Aciklama) " & _
"SELECT Seans,Koltuk,Tarife,Ucret,BiletNO,Aciklama"
DoCmd.OpenReport "BiletRapor", acViewPreview
Seans = Null
Seans_AfterUpdate
Koltuk = Null
Tarife = Null
Ucret = Null
BiletNo = Null
Aciklama = Null
Seans.SetFocus
End If
End If
End If
End If
Exit_Komut24_Click:
Exit Sub
Err_Komut24_Click:
MsgBox Err.Description
Resume Exit_Komut24_Click
End Sub
Private Sub Seans_DblClick(Cancel As Integer)
' DoCmd.Close
DoCmd.OpenForm "Seanslar"
End Sub
Private Sub Tarife_AfterUpdate()
Ucret = Dlookup ("Ucret", "FiyatListesi", "FiyatNO=Forms!Bilet!Tarife")
End Sub
Private Sub Tarife_DblClick(Cancel As Integer)
DoCmd.OpenForm "Fiyatlar"
End Sub
Private Sub Ucret_DblClick(Cancel As Integer)
DoCmd.OpenForm "Fiyatlar"
End Sub
Private Sub Komut25_Click()
On Error GoTo Err_Komut25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Seanslar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut25_Click:
Exit Sub
Err_Komut25_Click:
MsgBox Err.Description
Resume Exit_Komut25_Click
End Sub
Private Sub Komut26_Click()
On Error GoTo Err_Komut26_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Film"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut26_Click:
Exit Sub
Err_Komut26_Click:
MsgBox Err.Description
Resume Exit_Komut26_Click
End Sub
Private Sub Komut27_Click()
On Error GoTo Err_Komut27_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Koltuklar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut27_Click:
Exit Sub
Err_Komut27_Click:
MsgBox Err.Description
Resume Exit_Komut27_Click
End Sub
Private Sub Komut28_Click()
On Error GoTo Err_Komut28_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Fiyatlar"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut28_Click:
Exit Sub
Err_Komut28_Click:
MsgBox Err.Description
Resume Exit_Komut28_Click
End Sub
Private Sub Komut29_Click()
On Error GoTo Err_Komut29_Click
DoCmd.Quit
Exit_Komut29_Click:
Exit Sub
Err_Komut29_Click:
MsgBox Err.Description
Resume Exit_Komut29_Click
End Sub
Private Sub Komut30_Click()
On Error GoTo Err_Komut30_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut30_Click:
Exit Sub
Err_Komut30_Click:
MsgBox Err.Description
Resume Exit_Komut30_Click
End Sub