Table of contents
TOC
Collapse the table of content
Expand the table of content

Cancel Method Example (VBScript)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Applies to: Access 2013 | Access 2016

The following example shows how to read the Cancel method at run time. Cut and paste the following code to Notepad or another text editor and save it as CancelVBS.asp. You can view the result in any client browser.


<!-- BeginCancelVBS --><Script Language="VBScript">
<!--Sub cmdCancelAsync_OnClick
' Terminates currently running AsyncExecute,' ReadyState property set to adcReadyStateLoaded,
' Recordset set to NothingADC.Cancel
End Sub 
Sub cmdRefreshTable_OnClickADC.Refresh
End Sub-->
</Script> 
<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="ADC">.
<PARAM NAME="SQL" VALUE="Select FirstName, LastName from Employees"><PARAM NAME="CONNECT" VALUE="Provider='sqloledb';Integrated Security='SSPI';Initial Catalog='Northwind'">
<PARAM NAME="Server" VALUE="http://<%=Request.ServerVariables("SERVER_NAME")%>">.
</OBJECT> 
<TABLE DATASRC=#ADC><TBODY>
<TR><TD><SPAN DATAFLD="FirstName"></SPAN></TD>
<TD><SPAN DATAFLD="LastName"></SPAN></TD></TR>
</TBODY></TABLE> 
<FORM><INPUT type="button" value="Refresh" id=cmdRefreshTable name=cmdRefreshTable>
<INPUT type="button" value="Cancel" id=cmdCancelAsync name=cmdCancelAsync></FORM>
<!-- EndCancelVBS -->

ACCESS SUPPORT RESOURCES
Access for developers forum on MSDN
Access help on support.office.com
Access help on answers.microsoft.com
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft