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.
Dim dbs As Database
Dim qdf As QueryDef
Dim strSQL As String
Set dbs = CurrentDb
Debug.Print "me.ServerName="; Me.ServerName
strSQL = "SELECT ServerNames.ServerName, Drive_Space.DriveLetter, Drive_Space.Date, Drive_Space.FreeSpace, Drive_Space.DriveCapacity, Drive_Space.PercentFreeSpace " & _
"FROM ServerNames INNER JOIN Drive_Space ON ServerNames.ServerID = Drive_Space.ServerID " & _
"WHERE (((ServerNames.ServerName) = '" & Me.ServerName & "')) " & _
"ORDER BY ServerNames.ServerName, Drive_Space.DriveLetter, Drive_Space.Date; "
Set qdf = dbs.QueryDefs("qsGenericServerChart")
qdf.SQL = strSQL
Debug.Print strSQL
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me.Chart1.Object
objGraph.RowSource = "TRANSFORM Max(qsGenericServerChart.FreeSpace) AS MaxOfFreeSpace SELECT (Format([Date],'Short Date')) AS Expr1 FROM qsGenericServerChart GROUP BY (Int([Date])), (Format([Date],'Short Date')) PIVOT qsGenericServerChart.DriveLetter;"
'This will update the data sheet
objGraph.Application.Update
objGraph.Refresh
DoEvents
Set objGraph = Nothing