En basitinden bir form.
tüm kodları aşağıda,
bundada hata veriyor.
Option Compare Database
Private Sub Açılan_Kutu35_GotFocus()
Me.Açılan_Kutu35.Requery
End Sub
Private Sub Form_Load()
Call yazici_Click
End Sub
Private Sub Form_Open(Cancel As Integer)
kayitekle_Click
End Sub
Private Sub KAPAT2_Click()
'On Error GoTo Err_KAPAT2_Click
DoCmd.Close
Exit_KAPAT2_Click:
Exit Sub
Err_KAPAT2_Click:
MsgBox Err.Description
Resume Exit_KAPAT2_Click
End Sub
Private Sub kaydet_Click()
'On Error GoTo Err_kaydet_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
kayitekle_Click
Exit_kaydet_Click:
Exit Sub
Err_kaydet_Click:
MsgBox Err.Description
Resume Exit_kaydet_Click
End Sub
Private Sub sil_Click()
'On Error GoTo Err_sil_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_sil_Click:
Exit Sub
Err_sil_Click:
MsgBox Err.Description
Resume Exit_sil_Click
End Sub
Private Sub kayitekle_Click()
'On Error GoTo Err_kayitekle_Click
DoCmd.GoToRecord , , acNewRec
Me.HATA_ADI.SetFocus
Exit_kayitekle_Click:
Exit Sub
Err_kayitekle_Click:
MsgBox Err.Description
Resume Exit_kayitekle_Click
End Sub
Private Sub Açılan_Kutu35_AfterUpdate()
' Denetime uyan kaydı bul.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Açılan Kutu35], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub LISTEYAZDIR_Click()
'On Error GoTo Err_LISTEYAZDIR_Click
Dim stDocName As String
stDocName = "HATA_ADI_TANIMLA"
DoCmd.OpenReport stDocName, acPreview
Exit_LISTEYAZDIR_Click:
Exit Sub
Err_LISTEYAZDIR_Click:
MsgBox Err.Description
Resume Exit_LISTEYAZDIR_Click
End Sub
Private Sub HATA_RAPORU_PARTI_Click()
'On Error GoTo Err_HATA_RAPORU_PARTI_Click
If IsNull(Me.yazicisec) Then
MsgBox "Önce yazıcıyı seçiniz", vbCritical, "Yazıcıyı Seçiniz!"
Exit Sub
End If
Dim prt As Printer
Dim stDocName As String
Set prt = Application.Printers(Me!yazicisec.Value)
Set Application.Printer = prt
stDocName = "HATA_ADI_TANIMLA"
DoCmd.OpenReport stDocName, acPreview
'DoCmd.OpenReport stDocName, acNormal
Exit_HATA_RAPORU_PARTI_Click:
Exit Sub
Err_HATA_RAPORU_PARTI_Click:
MsgBox Err.Description
Resume Exit_HATA_RAPORU_PARTI_Click
End Sub
Private Sub yazici_Click()
Dim prt As Printer
Me.yazicisec.RowSource = ""
For Each prt In Application.Printers
Me!yazicisec.AddItem Item:=prt.DeviceName
Next prt
End Sub
husem, proud to be a member of AccessTr.neT since 08-03-2009.
Cevapla