Option Compare Database Private Sub Komut2_Click() Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Tablo1") rst.Move 2 rst.Edit a = rst.Fields(2).Value Metin0.SetFocus b = Val(Metin0.Text) rst("fiyat").Value = a + b rst.Update End Sub
Option Compare Database Sub soru4() Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Tablo1") Do Until rst.EOF rst.Edit If rst.Fields("fiyat").Value > 100 Then a = rst.Fields("fiyat").Value * 0.5 Top = a + rst.Fields("fiyat").Value rst.Fields("fiyat").Value = Top End If If rst.Fields("fiyat").Value < 100 Then a = rst.Fields("fiyat").Value * 1 Top = a + rst.Fields("fiyat").Value rst.Fields("fiyat").Value = Top End If rst.Update rst.MoveNext Loop End Sub