Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub DBGrid1_AfterUpdate()
Dim SQL As String
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
SQL = "Select SUM(Price) As SP From myTable Where ... "
cn.Open "Provider= ... Some Connection String ... "
rs.CursorLocation = adUseClient
rs.Open SQL, cn
If IsNull(rs![SP]) Then
lblPrice.Caption = "$0.00"
Else
lblPrice.Caption = Format(rs![SP], "$###,##0.00")
End If
Set rs = Nothing
Set cn = Nothing
End Sub