Skip to main content

AccessTr.neT


Sorgu Sonucunu Toplama

Sorgu Sonucunu Toplama

#2
aşağıdaki gibi yapmaya çalıştım ama olmadı.
Private Sub DOKUMA_DOLULUK()

ARAILK = ">=#" & Month(Me.ARAILKTARIH) & " / " & Day(Me.ARAILKTARIH) & " / " & Year(Me.ARAILKTARIH) & "#"
ARASON = "<=#" & Month(Me.ARASONTARIH) & " / " & Day(Me.ARASONTARIH) & " / " & Year(Me.ARASONTARIH) & "#"

Dim rs As New ADODB.Recordset
rs.Open "SELECT Sum([en]*[boy]*[gramaj]*1.05*1.08*[adet]/10000000) AS DOLULUK From SIPARIS_KAYIT GROUP BY SIPARIS_KAYIT.YUKLEME_TARIHI HAVING (SIPARIS_KAYIT.YUKLEME_TARIHI" & ARAILK & ") AND (SIPARIS_KAYIT.YUKLEME_TARIHI" & ARASON & ")", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If Not rs.EOF Then
'
MsgBox RoundA(rs("DOLULUK"))
Dim i As Long, Sonuc1 As Double
For i = 1 To rs.Fields.Count - 1
Sonuc1 = Sonuc1 + rs.Fields(i).Value
Next i

MsgBox Sonuc1

Else
End If
rs.Close
End Sub
husem, proud to be a member of AccessTr.neT since 08-03-2009.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Sorgu Sonucunu Toplama - Yazar: husem - 14/11/2021, 11:22
RE: Sorgu Sonucunu Toplama - Yazar: husem - 14/11/2021, 11:50
RE: Sorgu Sonucunu Toplama - Yazar: lemoncher2 - 14/11/2021, 12:08
RE: Sorgu Sonucunu Toplama - Yazar: husem - 14/11/2021, 12:11
RE: Sorgu Sonucunu Toplama - Yazar: lemoncher2 - 14/11/2021, 12:12
Re: Sorgu Sonucunu Toplama - Yazar: husem - 14/11/2021, 12:58
Re: Sorgu Sonucunu Toplama - Yazar: lemoncher2 - 14/11/2021, 13:10
RE: Sorgu Sonucunu Toplama - Yazar: husem - 14/11/2021, 14:05
RE: Sorgu Sonucunu Toplama - Yazar: lemoncher2 - 14/11/2021, 14:21
Task