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 Form_Load()
Dim strSQL As String
strSQL = "SELECT Sum (Equipment_Bookings.Quantity * Equipment.CostPerDay) " & vbCrLf & _
"FROM Equipment_Bookings, Equipment " & vbCrLf & _
"WHERE Equipment.ID = Equipment_Bookings.Equipment "
txtSQL = strSQL
End Sub
Private Sub cmdSQL_Click()
Dim strSQL As String
Dim strFill As String
Dim objRec As ADODB.Recordset
strSQL = "SELECT Sum (Equipment_Bookings.Quantity * Equipment.CostPerDay) " & _
"FROM Equipment_Bookings, Equipment " & _
"WHERE Equipment.ID = Equipment_Bookings.Equipment "
Set objRec = New ADODB.Recordset
objRec.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockReadOnly, adCmdText
strFill = objRec.GetString(adClipString, ColumnDelimeter:=" ", RowDelimeter:=vbCrLf)
Me.Text1 = strFill
objRec.Close
Set objRec = nothing
End Sub