ACC2000: Data Access Page MSODSC Events Do Not Run By Default (257637)
The information in this article applies to:
This article was previously published under Q257637 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you place script in any of the events of the Microsoft Office Data Source Control (MSODSC), and you leave the arguments of the events at their default values, the script in the events does not run.
CAUSE
The default language that is set for all data access page events is VBScript, and the parameter in the EVENT argument is missing. Until you supply a parameter to this argument, the event does not run. When the language variable is set to JSCRIPT, the MSODSC events do run because then a parameter is not required.
RESOLUTION
Add an argument to the event of the MSODSC. It does not matter what you add as the argument, as long as you add one. The following example shows you how to add an argument to the Current event; however, all of the events of the MSODSC that you add script to need an argument.
- Open a data access page in Design view.
- On the Tools menu, point to Macro, and then click Microsoft Script Editor.
- By default, the Script Editor tool appears in the first of the three panes in the Microsoft Script Editor. This pane also contains the HTML Outline and Toolbox tabs. Click the Script Editor tab, and then browse through the tree to the event that you want to add an argument to. For example, select the following path to add an argument to the Current event:
Client Object and Events\MSODSC\Current
- Change the Script tag for the Current event of the MSODSC from
<SCRIPT event=Current for=MSODSC language=vbscript>
to
<SCRIPT event=Current(abc) for=MSODSC language=vbscript>
- On the File menu, click Save.
- On the File menu, click Exit to close the Microsoft Script Editor.
- On the View menu, click Page View. Note that the alert appears.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbDAP kbDAPScript kbprb KB257637 |
---|
|