Klos, Susan
Susan.Klos at fldoe.org
Mon Jun 9 08:37:43 CDT 2003
OK, Here I am now: Dim school As String Dim strFileName As String Dim mysql As String Dim qdf As QueryDef Dim db As Database Set db = currentdatabase school = InputBox("What School Number") 'DoCmd.TransferSpreadsheet acExport, 8, "Reading", "T:\2002-2003\SchoolGrades\Data\Reading" & school & ".xls", True, "" mysql = "SELECT ReadingGrade.DistSchNo, ReadingGrade.Grade, ReadingGrade.LName, " & _ "ReadingGrade.FName, ReadingGrade.IDSS, ReadingGrade.Curr03, ReadingGrade.MatchFCAT02, " & _ "ReadingGrade.LevelR03, ReadingGrade.LevelR02, ReadingGrade.DSS03R, " & _ "ReadingGrade.DSSR02 AS Expr1, ReadingGrade.SSR02, ReadingGrade.Lo25" & _ "FROM ReadingGrade WHERE (((ReadingGrade.DistSchNo)=" & school & "))" 'MsgBox school Set qdf = db.QueryDefs("Reading") strFileName = "T:\2002-2003\SchoolGrades\Data\Reading" & school & ".xls" qdf.SQL = mysql MsgBox "tablename = " & strFileName DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, qdf.Name, strFileName, True I am now getting this message when I get to Set qdf = db.QueryDefs "Object Required" I have a query called "Reading" and I thought I had DIMmed everything.