Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim intRecordsToChart As Integer ' Find the number of records that the chart will contain. intRecordsToChart = _ DCount("*", "Products", "SupplierID=" & Nz(Me!SupplierID, 0)) If intRecordsToChart = 0 Then ' Shrink the chart and Detail section. Me.Graph1.Height = 0 Me.Graph1.Width = 0 Me.Graph1.Visible = False Me.Detail.Height = 1080 Else ' Restore the chart to size and refresh it. Me.Detail.Height = 6200 Me.Graph1.Height = 5220 Me.Graph1.Width = 6040 Me.Graph1.Object.Refresh Me.Graph1.Visible = True End If End Sub