📄 snpcreate.wsf
字号:
<?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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -