snpcreate.wsf
来自「Apress - Managing Enterprise Systems Wit」· WSF 代码 · 共 38 行
WSF
38 行
<?xml version="1.0" ?>
<job>
<reference guid="{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}"/>
<!--comment
snpcreate.wsf
Build a snapshot from the Sales by Year Dialog report in
the Northwind database
-->
<script language="VBScript">
<![CDATA[
Option Explicit
Dim objAccess, objForm
'create
Set objAccess = CreateObject("Access.Application")
'open the Northwind database
objAccess.OpenCurrentDatabase "d:\northwind.mdb"
'open the form 'Sales by Year Dialog', required for the report
objAccess.DoCmd.OpenForm "Sales by Year Dialog"
'get a reference to the open 'Sales by Year Dialog' form and set
'the text fields with values for the report
Set objForm = objAccess.Forms("Sales by Year Dialog")
objForm.Controls("BeginningDate").Value = "1/1/95"
objForm.Controls("EndingDate").Value = "12/31/95"
'build report
objAccess.DoCmd.OutputTo acOutputReport, "Sales by Year", _
"Snapshot Format", "d:\SalesByYear.snp"
objAccess.Quit
]]>
</script>
</job>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?