28/08/2009, 16:26
Sn Hocam ben VB nin v sini bilmiyorum. Daha yeni vb6 kurdum vb görsel eğitim cd sini izliyorum. Hocam siz daha iyi biliyorsunuz Access te yaptığımız bazı olay yordamlarını otomatic olarak kod yazdığımız sayfaya kendisi yazıyor. Size kodları gönderiyorum bunları ben mi yaptım diyorum. Hiç alakası yok ben masumum. Saygılar...
Option Compare Database
Private Sub FİRMALAR_Click()
On Error GoTo Err_FİRMALAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(70) & ChrW(304) & ChrW(82) & ChrW(77) & ChrW(65) & ChrW(76) & ChrW(65) & ChrW(82)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_FİRMALAR_Click:
Exit Sub
Err_FİRMALAR_Click:
MsgBox Err.Description
Resume Exit_FİRMALAR_Click
End Sub
Private Sub OPERASYONLAR_Click()
On Error GoTo Err_OPERASYONLAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OPERASYONLAR"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OPERASYONLAR_Click:
Exit Sub
Err_OPERASYONLAR_Click:
MsgBox Err.Description
Resume Exit_OPERASYONLAR_Click
End Sub
Private Sub Form_Load()
End Sub
Private Sub PARÇALAR_Click()
On Error GoTo Err_PARÇALAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PARÇALAR"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_PARÇALAR_Click:
Exit Sub
Err_PARÇALAR_Click:
MsgBox Err.Description
Resume Exit_PARÇALAR_Click
End Sub
Private Sub OPFORMU_Click()
On Error GoTo Err_OPFORMU_Click
Dim stDocName As String
stDocName = ChrW(79) & ChrW(112) & ChrW(101) & ChrW(114) & ChrW(97) & ChrW(115) & ChrW(121) & ChrW(111) & ChrW(110) & ChrW(32) & ChrW(83) & ChrW(97) & ChrW(121) & ChrW(102) & ChrW(97) & ChrW(115) & ChrW(305)
DoCmd.OpenReport stDocName, acPreview
Exit_OPFORMU_Click:
Exit Sub
Err_OPFORMU_Click:
MsgBox Err.Description
Resume Exit_OPFORMU_Click
End Sub
Private Sub İZLEME_Click()
On Error GoTo Err_İZLEME_Click
Dim stDocName As String
stDocName = ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117)
DoCmd.OpenReport stDocName, acPreview
Exit_İZLEME_Click:
Exit Sub
Err_İZLEME_Click:
MsgBox Err.Description
Resume Exit_İZLEME_Click
End Sub
Private Sub OPSIRAFORMU_Click()
On Error GoTo Err_OPSIRAFORMU_Click
Dim stDocName As String
stDocName = ChrW(79) & ChrW(112) & ChrW(101) & ChrW(114) & ChrW(97) & ChrW(115) & ChrW(121) & ChrW(111) & ChrW(110) & ChrW(32) & ChrW(83) & ChrW(305) & ChrW(114) & ChrW(97) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117)
DoCmd.OpenReport stDocName, acPreview
Exit_OPSIRAFORMU_Click:
Exit Sub
Err_OPSIRAFORMU_Click:
MsgBox Err.Description
Resume Exit_OPSIRAFORMU_Click
End Sub
Private Sub LİSTE_Click()
On Error GoTo Err_LİSTE_Click
Dim stDocName As String
stDocName = ChrW(76) & ChrW(304) & ChrW(83) & ChrW(84) & ChrW(69)
DoCmd.OpenReport stDocName, acPreview
Exit_LİSTE_Click:
Exit Sub
Err_LİSTE_Click:
MsgBox Err.Description
Resume Exit_LİSTE_Click
End Sub
Private Sub kapat_Click()
If MsgBox("PARCA_OPERASYONLARI programından çıkmak istediğinize eminmisiniz.", vbCritical + vbOKCancel) = vbOK Then
On Error Resume Next
Dim CurDB As String, KopiaDB As String, LenDB As Long, Plik As String, NrPliku As Long
DoCmd.Hourglass -1
CurDB = CurrentDb.Name
Err = 0
Plik = Space(FileLen(CurDB))
NrPliku = FreeFile
Open CurDB For Binary Access Read Shared As #NrPliku
Get #NrPliku, 1, Plik
Close #NrPliku
If Err = 52 Then
MsgBox "Kopyalanamadı. " & CurDB & "Kopyalama işlemi başarısız.", 48, "Kopyalanıyor."
ElseIf Err Then
MsgBox Err.Description
Else
KopiaDB = "D:USERS\SERVER\YONETIM\Access Yedekleri\PARCA_OPERASYONLARI.mdb"
If KopiaDB & "" <> "" Then
Kill KopiaDB
Err = 0
NrPliku = FreeFile
Open KopiaDB For Binary Access Write Shared As #NrPliku
Put #NrPliku, 1, Plik
Close #NrPliku
If Err = 0 Then
Else
MsgBox Err.Description
End If
End If
End If
DoCmd.Hourglass 0
DoCmd.Quit
Else
Me.Undo
MsgBox "Programdan çıkmadınız."
End If
End Sub
Private Sub BÖLÜM_Click()
On Error GoTo Err_BÖLÜM_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(246) & ChrW(108) & ChrW(252) & ChrW(109) & ChrW(32) & ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101)
DoCmd.OpenReport stDocName, acPreview
Exit_BÖLÜM_Click:
Exit Sub
Err_BÖLÜM_Click:
MsgBox Err.Description
Resume Exit_BÖLÜM_Click
End Sub
Private Sub BÖLÜMLERE_GÖRE_Click()
On Error GoTo Err_BÖLÜMLERE_GÖRE_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(246) & ChrW(108) & ChrW(252) & ChrW(109) & ChrW(32) & ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101)
DoCmd.OpenReport stDocName, acPreview
Exit_BÖLÜMLERE_GÖRE_Click:
Exit Sub
Err_BÖLÜMLERE_GÖRE_Click:
MsgBox Err.Description
Resume Exit_BÖLÜMLERE_GÖRE_Click
End Sub
Private Sub Komut21_Click()
On Error GoTo Err_Komut21_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(214) & ChrW(76) & ChrW(220) & ChrW(77) & ChrW(69) & ChrW(32) & ChrW(71) & ChrW(214) & ChrW(82) & ChrW(69) & ChrW(32) & ChrW(304) & ChrW(90) & ChrW(76) & ChrW(69) & ChrW(77) & ChrW(69)
DoCmd.OpenReport stDocName, acPreview
Exit_Komut21_Click:
Exit Sub
Err_Komut21_Click:
MsgBox Err.Description
Resume Exit_Komut21_Click
End Sub
Private Sub KALİTE_Click()
On Error GoTo Err_KALİTE_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(75) & ChrW(65) & ChrW(76) & ChrW(304) & ChrW(84) & ChrW(69) & ChrW(32) & ChrW(80) & ChrW(76) & ChrW(65) & ChrW(78) & ChrW(73) & ChrW(32) & ChrW(71) & ChrW(304) & ChrW(82) & ChrW(304) & ChrW(350) & ChrW(304)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_KALİTE_Click:
Exit Sub
Err_KALİTE_Click:
MsgBox Err.Description
Resume Exit_KALİTE_Click
End Sub
Private Sub İŞEMRİ_Click()
On Error GoTo Err_İŞEMRİ_Click
Dim stDocName As String
stDocName = ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117) & ChrW(32) & ChrW(49)
DoCmd.OpenReport stDocName, acPreview
Exit_İŞEMRİ_Click:
Exit Sub
Err_İŞEMRİ_Click:
MsgBox Err.Description
Resume Exit_İŞEMRİ_Click
End Sub
Private Sub İŞEMİRLERİ_Click()
On Error GoTo Err_İŞEMİRLERİ_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(80) & ChrW(65) & ChrW(82) & ChrW(199) & ChrW(65) & ChrW(32) & ChrW(304) & ChrW(350) & ChrW(32) & ChrW(69) & ChrW(77) & ChrW(304) & ChrW(82) & ChrW(76) & ChrW(69) & ChrW(82) & ChrW(304)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_İŞEMİRLERİ_Click:
Exit Sub
Err_İŞEMİRLERİ_Click:
MsgBox Err.Description
Resume Exit_İŞEMİRLERİ_Click
End Sub
Option Compare Database
Private Sub FİRMALAR_Click()
On Error GoTo Err_FİRMALAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(70) & ChrW(304) & ChrW(82) & ChrW(77) & ChrW(65) & ChrW(76) & ChrW(65) & ChrW(82)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_FİRMALAR_Click:
Exit Sub
Err_FİRMALAR_Click:
MsgBox Err.Description
Resume Exit_FİRMALAR_Click
End Sub
Private Sub OPERASYONLAR_Click()
On Error GoTo Err_OPERASYONLAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "OPERASYONLAR"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OPERASYONLAR_Click:
Exit Sub
Err_OPERASYONLAR_Click:
MsgBox Err.Description
Resume Exit_OPERASYONLAR_Click
End Sub
Private Sub Form_Load()
End Sub
Private Sub PARÇALAR_Click()
On Error GoTo Err_PARÇALAR_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PARÇALAR"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_PARÇALAR_Click:
Exit Sub
Err_PARÇALAR_Click:
MsgBox Err.Description
Resume Exit_PARÇALAR_Click
End Sub
Private Sub OPFORMU_Click()
On Error GoTo Err_OPFORMU_Click
Dim stDocName As String
stDocName = ChrW(79) & ChrW(112) & ChrW(101) & ChrW(114) & ChrW(97) & ChrW(115) & ChrW(121) & ChrW(111) & ChrW(110) & ChrW(32) & ChrW(83) & ChrW(97) & ChrW(121) & ChrW(102) & ChrW(97) & ChrW(115) & ChrW(305)
DoCmd.OpenReport stDocName, acPreview
Exit_OPFORMU_Click:
Exit Sub
Err_OPFORMU_Click:
MsgBox Err.Description
Resume Exit_OPFORMU_Click
End Sub
Private Sub İZLEME_Click()
On Error GoTo Err_İZLEME_Click
Dim stDocName As String
stDocName = ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117)
DoCmd.OpenReport stDocName, acPreview
Exit_İZLEME_Click:
Exit Sub
Err_İZLEME_Click:
MsgBox Err.Description
Resume Exit_İZLEME_Click
End Sub
Private Sub OPSIRAFORMU_Click()
On Error GoTo Err_OPSIRAFORMU_Click
Dim stDocName As String
stDocName = ChrW(79) & ChrW(112) & ChrW(101) & ChrW(114) & ChrW(97) & ChrW(115) & ChrW(121) & ChrW(111) & ChrW(110) & ChrW(32) & ChrW(83) & ChrW(305) & ChrW(114) & ChrW(97) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117)
DoCmd.OpenReport stDocName, acPreview
Exit_OPSIRAFORMU_Click:
Exit Sub
Err_OPSIRAFORMU_Click:
MsgBox Err.Description
Resume Exit_OPSIRAFORMU_Click
End Sub
Private Sub LİSTE_Click()
On Error GoTo Err_LİSTE_Click
Dim stDocName As String
stDocName = ChrW(76) & ChrW(304) & ChrW(83) & ChrW(84) & ChrW(69)
DoCmd.OpenReport stDocName, acPreview
Exit_LİSTE_Click:
Exit Sub
Err_LİSTE_Click:
MsgBox Err.Description
Resume Exit_LİSTE_Click
End Sub
Private Sub kapat_Click()
If MsgBox("PARCA_OPERASYONLARI programından çıkmak istediğinize eminmisiniz.", vbCritical + vbOKCancel) = vbOK Then
On Error Resume Next
Dim CurDB As String, KopiaDB As String, LenDB As Long, Plik As String, NrPliku As Long
DoCmd.Hourglass -1
CurDB = CurrentDb.Name
Err = 0
Plik = Space(FileLen(CurDB))
NrPliku = FreeFile
Open CurDB For Binary Access Read Shared As #NrPliku
Get #NrPliku, 1, Plik
Close #NrPliku
If Err = 52 Then
MsgBox "Kopyalanamadı. " & CurDB & "Kopyalama işlemi başarısız.", 48, "Kopyalanıyor."
ElseIf Err Then
MsgBox Err.Description
Else
KopiaDB = "D:USERS\SERVER\YONETIM\Access Yedekleri\PARCA_OPERASYONLARI.mdb"
If KopiaDB & "" <> "" Then
Kill KopiaDB
Err = 0
NrPliku = FreeFile
Open KopiaDB For Binary Access Write Shared As #NrPliku
Put #NrPliku, 1, Plik
Close #NrPliku
If Err = 0 Then
Else
MsgBox Err.Description
End If
End If
End If
DoCmd.Hourglass 0
DoCmd.Quit
Else
Me.Undo
MsgBox "Programdan çıkmadınız."
End If
End Sub
Private Sub BÖLÜM_Click()
On Error GoTo Err_BÖLÜM_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(246) & ChrW(108) & ChrW(252) & ChrW(109) & ChrW(32) & ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101)
DoCmd.OpenReport stDocName, acPreview
Exit_BÖLÜM_Click:
Exit Sub
Err_BÖLÜM_Click:
MsgBox Err.Description
Resume Exit_BÖLÜM_Click
End Sub
Private Sub BÖLÜMLERE_GÖRE_Click()
On Error GoTo Err_BÖLÜMLERE_GÖRE_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(246) & ChrW(108) & ChrW(252) & ChrW(109) & ChrW(32) & ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101)
DoCmd.OpenReport stDocName, acPreview
Exit_BÖLÜMLERE_GÖRE_Click:
Exit Sub
Err_BÖLÜMLERE_GÖRE_Click:
MsgBox Err.Description
Resume Exit_BÖLÜMLERE_GÖRE_Click
End Sub
Private Sub Komut21_Click()
On Error GoTo Err_Komut21_Click
Dim stDocName As String
stDocName = ChrW(66) & ChrW(214) & ChrW(76) & ChrW(220) & ChrW(77) & ChrW(69) & ChrW(32) & ChrW(71) & ChrW(214) & ChrW(82) & ChrW(69) & ChrW(32) & ChrW(304) & ChrW(90) & ChrW(76) & ChrW(69) & ChrW(77) & ChrW(69)
DoCmd.OpenReport stDocName, acPreview
Exit_Komut21_Click:
Exit Sub
Err_Komut21_Click:
MsgBox Err.Description
Resume Exit_Komut21_Click
End Sub
Private Sub KALİTE_Click()
On Error GoTo Err_KALİTE_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(75) & ChrW(65) & ChrW(76) & ChrW(304) & ChrW(84) & ChrW(69) & ChrW(32) & ChrW(80) & ChrW(76) & ChrW(65) & ChrW(78) & ChrW(73) & ChrW(32) & ChrW(71) & ChrW(304) & ChrW(82) & ChrW(304) & ChrW(350) & ChrW(304)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_KALİTE_Click:
Exit Sub
Err_KALİTE_Click:
MsgBox Err.Description
Resume Exit_KALİTE_Click
End Sub
Private Sub İŞEMRİ_Click()
On Error GoTo Err_İŞEMRİ_Click
Dim stDocName As String
stDocName = ChrW(80) & ChrW(97) & ChrW(114) & ChrW(231) & ChrW(97) & ChrW(32) & ChrW(304) & ChrW(122) & ChrW(108) & ChrW(101) & ChrW(109) & ChrW(101) & ChrW(32) & ChrW(70) & ChrW(111) & ChrW(114) & ChrW(109) & ChrW(117) & ChrW(32) & ChrW(49)
DoCmd.OpenReport stDocName, acPreview
Exit_İŞEMRİ_Click:
Exit Sub
Err_İŞEMRİ_Click:
MsgBox Err.Description
Resume Exit_İŞEMRİ_Click
End Sub
Private Sub İŞEMİRLERİ_Click()
On Error GoTo Err_İŞEMİRLERİ_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(80) & ChrW(65) & ChrW(82) & ChrW(199) & ChrW(65) & ChrW(32) & ChrW(304) & ChrW(350) & ChrW(32) & ChrW(69) & ChrW(77) & ChrW(304) & ChrW(82) & ChrW(76) & ChrW(69) & ChrW(82) & ChrW(304)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_İŞEMİRLERİ_Click:
Exit Sub
Err_İŞEMİRLERİ_Click:
MsgBox Err.Description
Resume Exit_İŞEMİRLERİ_Click
End Sub