Bu kaydetme işini nasıl yapacaz yardımcı olabilecek arkadaş var mı ??
Kod:
Private Sub Form_Current()
Me.P1.SetFocus
End Sub
Private Sub Komut283_Click()
On Error GoTo tr
With DoCmd
.SetWarnings False
.RunSQL "delete from Gecici"
.SetWarnings True
End With
[İsim].Requery
tr:
DoCmd.Close
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(104) & ChrW(305) & ChrW(122) & ChrW(108) & ChrW(305) & ChrW(115) & ChrW(97) & ChrW(116) & ChrW(305) & ChrW(351)
DoCmd.OpenForm stDocName, , , stLinkCriteri
End Sub
Private Sub Komut38_Click()
On Error Resume Next
If IsNull(T1) Or IsNull(T4) Or IsNull(T5) Then
Me.T1.SetFocus
MsgBox "BU ÜRÜN STOKLARDA YOK BARKOTUNU KONTROL EDİN..!! BARKOD BULUNAMADI", vbCritical, "Ekrem ÇEVİK..."
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand (acCmdDeleteRecord)
Exit Sub
End If
Dim Rc As DAO.recordset
Set Rc = CurrentDb.OpenRecordset("YCari")
Rc.AddNew
Rc![isim] = Me.Metin311
Rc![AlTar] = Me.T2
Rc![MalinCinsi] = Me.T4
Rc![Miktar] = Me.Adet
Rc![PesBirFiy] = Me.T6
Rc![Tutari] = (Me.T6 - ((Me.T6 / 100) * Me.iskonto)) * Me.Adet
Rc![OdenenTL] = Me.T7
Rc![SatSek] = "S.Ö"
Rc![iskonto] = Me.iskonto
Rc.Update
GeciciKayit
Set Rc = Nothing
Me.TOPP = Me.TOPP + Me.T7
Me.Metin12 = Me.T4 & vbCrLf & Me.Metin12
Me.Metin144 = Me.T5 & vbCrLf & Me.Metin144
Me.Metin145 = (Me.T6 - ((Me.T6 / 100) * Me.iskonto)) * Me.Adet & " TL. " & vbCrLf & Me.Metin145
Me.Metin153 = Me.T1 & vbCrLf & Me.Metin153
Me.Metin155 = Me.T3 & vbCrLf & Me.Metin155
Me.Metin293 = Me.Adet & vbCrLf & Me.Metin293
Me.Metin297 = Me.T5 & "TL." & vbCrLf & Me.Metin297
Me.s1 = Me.s1 & " TL " & vbCrLf & Me.s1
Me.T1.SetFocus
Me.T1 = ""
Me.T3 = ""
Me.T4 = ""
Me.T5 = 1
Me.T6 = 0
Me.T8 = ""
Me.T9 = ""
Me.T1.SetFocus
Me.Metin153.SetFocus
Me.T1.SetFocus
End Sub
Sub GeciciKayit()
Dim Rc As DAO.recordset
Set Rc = CurrentDb.OpenRecordset("Gecici")
Rc.AddNew
Rc![isim] = Me.Metin311
Rc![AlTar] = Me.T2
Rc![MalinCinsi] = Me.T4
Rc![Miktar] = Me.Adet
Rc![PesBirFiy] = Me.T6
Rc![Tutari] = (Me.T6 - ((Me.T6 / 100) * Me.iskonto)) * Me.Adet
Rc![OdenenTL] = Me.T7
Rc![SatSek] = "S.Ö"
Rc![iskonto] = Me.iskonto
Rc.Update
Me.Gecici_alt_formu.Requery
End Sub
Private Sub P1_AfterUpdate()
P2 = DLookup("[ADISOYADI]", "CALISANLAR", "[CALNO] = P1")
End Sub
Private Sub T1_AfterUpdate()
Me.T6 = DLookup("SatisFiyati", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.z1 = DLookup("GirenAd", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.u1 = DLookup("MalinCinsi", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.s1 = DLookup("SatisFiyati", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.T4 = DLookup("MalinCinsi", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.T6 = DLookup("SatisFiyati", "Urunler", "UrunKodu='" & Me.T1 & "'")
Me.TOPP = Nz([T5] * Nz([T6]))
Komut38_Click
Me.T1.SetFocus
Me.YCari_alt_formu3.Requery
Me.T1.SetFocus
End Sub
Private Sub Komut260_Click()
Me.T9 = ""
Me.T8 = ""
Me.T1 = ""
Me.T3 = ""
Me.T4 = ""
Me.T5 = 1
Me.T6 = 0
Me.Metin153 = ""
Me.Metin155 = ""
Me.Metin12 = ""
Me.Metin144 = ""
Me.Metin145 = ""
Me.TOPP = 0
Me.T1.SetFocus
'Me.YCari_alt_formu3.SetFocus
End Sub
Private Sub Komut16_Click()
On Error GoTo Err_Komut16_Click
DoCmd.Close
Exit_Komut16_Click:
Exit Sub
Err_Komut16_Click:
MsgBox err.Description
Resume Exit_Komut16_Click
End Sub
Private Sub Komut249_Click()
On Error GoTo Err_Komut249_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Komut249_Click:
Exit Sub
Err_Komut249_Click:
MsgBox err.Description
Resume Exit_Komut249_Click
End Sub
Private Sub Komut257_Click()
On Error GoTo Err_Komut257_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Komut257_Click:
Exit Sub
Err_Komut257_Click:
MsgBox err.Description
Resume Exit_Komut257_Click
End Sub
Private Sub Komut258_Click()
On Error GoTo Err_Komut258_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
Exit_Komut258_Click:
Exit Sub
Err_Komut258_Click:
MsgBox err.Description
Resume Exit_Komut258_Click
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then
DoCmd.Close
End If
End Sub
Private Sub Komut276_Click()
On Error GoTo Err_Komut276_Click
Dim stAppName As String
stAppName = "C:\WINDOWS\system32\calc.exe"
Call Shell(stAppName, 1)
Exit_Komut276_Click:
Exit Sub
Err_Komut276_Click:
MsgBox err.Description
Resume Exit_Komut276_Click
End Sub
Private Sub SİL_Click()
Me.T1.SetFocus
End Sub
Private Sub Komut287_Click()
On Error GoTo Err_Komut287_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(104) & ChrW(305) & ChrW(122) & ChrW(108) & ChrW(305) & ChrW(115) & ChrW(97) & ChrW(116) & ChrW(305) & ChrW(351)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Komut287_Click:
Exit Sub
Err_Komut287_Click:
MsgBox err.Description
Resume Exit_Komut287_Click
End Sub
Private Sub Komut288_Click()
On Error GoTo Err_Komut288_Click
DoCmd.Close
Exit_Komut288_Click:
Exit Sub
Err_Komut288_Click:
MsgBox err.Description
Resume Exit_Komut288_Click
End Sub
Private Sub Komut320_Click()
On Error GoTo Err_Komut320_Click
DoCmd.Close
Exit_Komut320_Click:
Exit Sub
Err_Komut320_Click:
MsgBox err.Description
Resume Exit_Komut320_Click
End Sub
Private Sub Komut310_Click()
On Error GoTo Err_Komut310_Click
Dim stDocName As String
stDocName = "Gecici Sorgu"
DoCmd.OpenReport stDocName, acPreview
Exit_Komut310_Click:
Exit Sub
Err_Komut310_Click:
MsgBox err.Description
Resume Exit_Komut310_Click
End Sub
Private Sub T1_Exit(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
T1.SetFocus
End Sub
Private Sub T1_LostFocus()
DoCmd.GoToRecord , , acNewRec
T1.SetFocus
End Sub