24-03-2013, 09:18
vbcode icine
--------------------------------------------------
sub calistir()
call islem("toolmaker")
end sub
----------------------------------------------------
sub islem(Ne as string)
dim vrt as Recordset
set vrt = application,currentdb,openrecorset("SELECT IIf(IsNull([Cost of Trail]),0,Sum([Cost of Trail])) AS Toplam FROM Trails WHERE (((Trails.Where)='" & Ne & "'))")
vrt.movefirst
msgbox vrt.fields(0) ' ***** Ekranda toplam deger gorunur *****
vrt.close
set vrt = nothing
end sub
Yukaridaki kodu eylem yerine kopyalayin
biraz incelerseniz isinize yarayacaktir.
--------------------------------------------------
sub calistir()
call islem("toolmaker")
end sub
----------------------------------------------------
sub islem(Ne as string)
dim vrt as Recordset
set vrt = application,currentdb,openrecorset("SELECT IIf(IsNull([Cost of Trail]),0,Sum([Cost of Trail])) AS Toplam FROM Trails WHERE (((Trails.Where)='" & Ne & "'))")
vrt.movefirst
msgbox vrt.fields(0) ' ***** Ekranda toplam deger gorunur *****
vrt.close
set vrt = nothing
end sub
Yukaridaki kodu eylem yerine kopyalayin
biraz incelerseniz isinize yarayacaktir.

