Microsoft Knowledge Base Email Alertz

(204204) - When you add an option button to a data access page as a stand-alone control, you are not able to select the button by default. For an option button to work correctly, you must set a value for both the ID and Name properties. When you create an option...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 204204 - Last Review: June 29, 2004 - Revision: 2.0

ACC2000: Option Buttons on a Data Access Page Must Have Name and ID Property Values

This article was previously published under Q204204
Moderate: Requires basic macro, coding, and interoperability skills.

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

On This Page

SYMPTOMS

When you add an option button to a data access page as a stand-alone control, you are not able to select the button by default. For an option button to work correctly, you must set a value for both the ID and Name properties. When you create an option button from the toolbox in the Design view of a page, the Name property is not automatically set. You must modify the HTML source that defines the option button to include a Name attribute. After you have done so, the option button will become selectable.

RESOLUTION

For an example of how to modify the HTML source for an option button, follow these steps:
  1. In the Database window, click Pages under Objects, and then click New.
  2. In the New Data Access Page dialog box, click Design View, and then click OK.
  3. If the toolbox is not displayed, click Toolbox on the View menu.
  4. Add a new option button to the page.
  5. On the Tools menu, point to Macro, and then click Microsoft Script Editor.
  6. On the View menu, point to Other Windows, and then click Document Outline.
  7. Browse through the Document Outline window to the Option0 control, and then select the control.

    Note that the Script pane contains code similar to the following HTML that defines the Option0 control:
    <INPUT
    id=Option0 style="HEIGHT: 0.166in; LEFT: 1.375in; POSITION: absolute; TOP:
    1.166in; WIDTH: 0.18in" tabIndex=1 title=Option0 type=radio>
    					
  8. Modify the HTML by adding a name attribute. For example, to the code from the previous step, note how a name attribute (name=Option0) is added:
    <INPUT 
    id=Option0 name=Option0 style="HEIGHT: 0.166in; LEFT: 1.375in; POSITION:
    absolute; TOP: 1.166in; WIDTH: 0.18in" tabIndex=1 title=Option0 type=radio>
    					
  9. On the File menu, click Save.
  10. On the File menu, click Close to close the Microsoft Script Editor.
  11. On the View menu, click Page View. Note that the option button on the page is now selectable.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. In the Database window, click Pages under Objects, and then click New.
  2. In the New Data Access Page dialog box, click Design View, and then click OK.
  3. If the toolbox is not displayed, click Toolbox on the View menu.
  4. Add a new option button to the page.
  5. On the View menu, click Page View.

    Note that when you try to select the option button, nothing happens.

APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbdap kbprb kbpending KB204204
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate