Microsoft KB Archive/203165

= ACC2000: Mouse Pointer Does Not Change Its Appearance When You Set It Programmatically in a Data Access Page =

Article ID: 203165

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q203165



This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

Advanced: Requires expert coding, interoperability, and multiuser skills.



SYMPTOMS
When you use script in a data access page to change the appearance of a mouse pointer, the mouse pointer does not change its appearance until you physically move the mouse.



MORE INFORMATION
Developers often change the appearance of a mouse pointer programmatically to inform a user that some action needs to be taken. For example, changing the mouse pointer to an hourglass informs the user to wait until some process has completed before the user can continue.

In data access pages, however, if the developer uses script to change the appearance of the mouse pointer, the mouse pointer will not change its appearance until the user moves the mouse.

Steps to Reproduce the Behavior
 Open any database. In the Database window, click Pages under Objects, and then click New. In the New Data Access Page dialog box, click Design View, and then click OK. Add a command button to the Section: Unbound section of the data access page. On the Tools menu, point to Macro, and then click Microsoft Script Editor.  On the HTML menu, point to Script Block, click Client, and then type the following code: Dim blnVar </li> On the View menu, point to Other Windows, and then click Script Outline. This places the focus on the Client Objects & Events node.</li>  Expand the Command0 node, and then double-click the onclick node. This moves the mouse pointer to the onclick event script for Command0. Type the following script: If blnVar Then document.body.style.cursor = "default" Else document.body.style.cursor = "wait" End If

blnVar = Not blnVar </li> Press ALT+TAB to switch back to Microsoft Access, and then click Page View on the View menu.</li> Click the command button. Note that the mouse pointer does not become an hourglass until you move the mouse pointer off the command button.</li> Without using the mouse, press ENTER to trigger the command button. Note that the hourglass does not return to an arrow until you move the mouse. You can test this behavior repeatedly by pressing ENTER, and then moving the mouse.</li></ol>

Additional query words: prb cursor

Keywords: kbbug kbdap KB203165

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.