Kaup, Chester
Chester_Kaup at kindermorgan.com
Tue Jun 19 08:16:51 CDT 2007
I am trying to use a sub routine but my knowledge here is very limited. I get a message of sub or function not defined on the line Select Case rpt(i).ControlType Below is the part of the code I believe is relevant. Any help to an amateur appreciated. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim frm As Form, ctl As Control Dim varItm As Variant, intCnt As Integer Dim MaxY1 As Single, MaxY2 As Single, MajorUnitY1 As Single, MinorUnitY1 As Single, MajorUnitY2 As Single, MinorUnitY2 As Single Set frm = [Forms]![frm 90 Days Oil Gas and Water2] Set ctl = frm!ManifoldList Set rpt = Reports("rpt 90 Days Oil Gas Water") DoCmd.SetWarnings Off 'get the row number of the selected row in the list box varItm = ctl.ListIndex Select Case varItm Case 8 MaxY1 = 27000 MaxY2 = 900 MajorUnitY1 = 4500 MinorUnitY1 = 900 MajorUnitY2 = 150 MinorUnitY2 = 30 'Count the number of controls intCnt = rpt.Count FormatGraph intCnt, MaxY1, MaxY2, MajorUnitY1, MinorUnitY1, MajorUnitY2, MinorUnitY2 Sub FormatGraph(intCnt As Integer, MaxY1 As Single, MaxY2 As Single, MajorUnitY1 As Single, MinorUnitY1 As Single, MajorUnitY2 As Single, MinorUnitY2 As Single) For i = 0 To intCnt - 1 Select Case rpt(i).ControlType Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.