论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > Access数据库教程
Tag:2000,2003,2007,查询,sql,,教程,安全,转换,排序,复制,删除,修改,视频教程

ACCESS中EXCEL表格的导出

文章类别:Access数据库 | 发表日期:2009-7-26 11:28:32

ACCESS中EXCEL表格的导出

     Private Sub Command85_Click() '生成EXCEL表

  Dim exFile As String, Shellstg As String

  '导出[XX中学摸底成绩]

  DoCmd.TransferSpreadsheet acExport, 8, Me.Combo69 & "摸底成绩", CurrentProject.Path & "\" & Me.Combo69, False, ""

  '导出[XX中学]成绩

  DoCmd.TransferSpreadsheet acExport, 8, Me.Combo69, CurrentProject.Path & "\" & Me.Combo69, False, ""

  '导出[XX中学摸底单科]

  SQL = "Select " & Me.Combo69 & ".*"

  SQL = SQL + " FROM " & Me.Combo69 & "摸底成绩 INNER JOIN " & Me.Combo69 & " ON " & Me.Combo69 & "摸底成绩.姓名 = " & Me.Combo69 & ".姓名"

  SQL = SQL + " orDER BY " & Me.Combo69 & "摸底成绩.总分 DESC;"

  '建立[XX中学摸底单科]查询

  On Error Resume Next

  Set qdf = CurrentDb.CreateQueryDef(Me.Combo69 & "摸底单科", SQL) '[XX中学摸底单科]

  '导出[XX中学摸底单科]

  DoCmd.TransferSpreadsheet acExport, 8, Me.Combo69 & "摸底单科", CurrentProject.Path & "\" & Me.Combo69, False, ""

  DoCmd.Close

  ''请注意引号的用法

  Shellstg = """c:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"" """ & CurrentProject.Path & "\招生.XLS" & """"

  Call Shell(Shellstg, 1)

  End Sub

视频教程列表
文章教程搜索
 
Access数据库推荐教程
Access数据库热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058