[AccessD] MOre help needed

Klos, Susan Susan.Klos at fldoe.org
Mon Jun 9 09:32:16 CDT 2003


Thanks Paul.  I solved it.  You are still a lifesaver.

-----Original Message-----
From: Klos, Susan [mailto:Susan.Klos at fldoe.org]
Sent: Monday, June 09, 2003 10:29 AM
To: 'accessd at databaseadvisors.com'
Subject: RE: RE: [AccessD] MOre help needed


Practicallyl there and thanks for yoru help.  your a lifesaver.  
How do I move to the next record.  it doesnt like NextRecord.  Says it is
not defined
     DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, qdf.Name,
strFileName, True
     NextRecord
    Loop

-----Original Message-----
From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net]
Sent: Monday, June 09, 2003 10:16 AM
To: accessd at databaseadvisors.com
Subject: RE: RE: [AccessD] MOre help needed


Susan, you set it to the recordses fields like below

school = rs.Fields("DistSchNo")





From: "Klos, Susan" <Susan.Klos at fldoe.org>
Date: Mon 09/Jun/2003 14:08 GMT
To: "'accessd at databaseadvisors.com'" <accessd at databaseadvisors.com>
Subject: RE: RE: [AccessD] MOre help needed

Paul, I about have this.  Just one more question, I think.  

Set rs = db.OpenRecordset("GradedSchools")
    Do Until (rs.EOF)
    
    'school = InputBox("What School Number")
    school = "[GradedSchools.DistSchNo]"

What do I set school equal to?  The field I want to pick up is
GradedSchools.DistSchNo


-----Original Message-----
From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net]
Sent: Monday, June 09, 2003 9:59 AM
To: accessd at databaseadvisors.com
Subject: RE: RE: [AccessD] MOre help needed


ok Susan, try the following code :
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")
    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.CreateQueryDef("Reading")
     
     strFileName = "T:\2002-2003\SchoolGrades\Data\Reading" & school &
".xls"
     qdf.SQL = mysql
     MsgBox "tablename = " & strFileName
     
     DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, qdf.Name,
strFileName, True





From: "Klos, Susan" <Susan.Klos at fldoe.org>
Date: Mon 09/Jun/2003 13:37 GMT
To: "'accessd at databaseadvisors.com'" <accessd at databaseadvisors.com>
Subject: RE: RE: [AccessD] MOre help needed

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.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


__________________________________________________________________________
Join Freeserve http://www.freeserve.com/time/

Winner of the 2003 Internet Service Providers' Association awards for Best
Unmetered ISP and Best Consumer Application.


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


__________________________________________________________________________
Join Freeserve http://www.freeserve.com/time/

Winner of the 2003 Internet Service Providers' Association awards for Best
Unmetered ISP and Best Consumer Application.


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list