güncelleme Kodu
Sub VeriGuncelle()
xEnBoy = " UPDATE Tbl_Mekanikhesaplama SET" _
& " en=IIf([En]<1,1,IIf([En]>1.4 and [En]<=2,2,(Int([En]*10-0.1+1)/10)))," _
& " boy=IIf([Boy]<2,2,(Int([Boy]*10-0.1+1)/10))"
CurrentDb.Execute xEnBoy
xMetrekare = " UPDATE Tbl_Mekanikhesaplama SET" _
& " Metrekare=en*boy"
CurrentDb.Execute xMetrekare
End Sub
txtboy ve txten çıkıldığında olayları
Private Sub txtboy_Exit(Cancel As Integer)
Boy = IIf(txtboy < 2, 2, (Int(txtboy * 10 - 0.1 + 1) / 10))
Metrekare = txten * txtboy
End Sub
Private Sub txten_Exit(Cancel As Integer)
En = IIf(txten < 1, 1, IIf(txten > 1.4 And txten <= 2, 2, (Int(txten * 10 - 0.1 + 1) / 10)))
Metrekare = txten * txtboy
End Sub