title image


Smiley Re: DSumme selbst erstellen


Public Function D_Sum(FName As String, TName As String, Optional Krit As String = "")

Dim RS As New ADODB.Recordset, SQL As String

SQL = "SELECT Sum([" & FName & "]) Res FROM [" & TName & "]"

If Krit "" Then SQL = SQL & " WHERE " & Krit

RS.Open SQL, CurrentProject.Connection

If Not RS.EOF Then D_Sum = RS!Res

RS.Close

Set RS = Nothing

End Function




Gruß aus dem Norden

Reinhard


Bitte immer die Access-Version angeben


 



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: