Microsoft KB Archive/170691: Difference between revisions

From BetaArchive Wiki
m (Text replacement - ">" to ">")
m (Text replacement - "&" to "&")
 
(One intermediate revision by the same user not shown)
Line 51: Line 51:
== SYMPTOMS ==
== SYMPTOMS ==


When you export a form to ASP and view the ASP file in a browser, label controls with access keys are displayed with their literal caption text. For example, a form may contain a label control whose caption is &amp;Supplier ID. When you view the form in Form view in Microsoft Access, the caption appears as Supplier ID with an underscore under the &quot;S.&quot; However, the caption appears as &amp;Supplier ID when you view the corresponding ASP file.<br />
When you export a form to ASP and view the ASP file in a browser, label controls with access keys are displayed with their literal caption text. For example, a form may contain a label control whose caption is &Supplier ID. When you view the form in Form view in Microsoft Access, the caption appears as Supplier ID with an underscore under the "S." However, the caption appears as &Supplier ID when you view the corresponding ASP file.<br />
<br />
<br />
NOTE: This article contains information about editing ASP files. It assumes that you are familiar with Active Server Pages, Visual Basic Scripting, and editing HTML files. Microsoft Access Product Support professionals do not support modification of any HTML, HTX, IDC, or ASP files.
NOTE: This article contains information about editing ASP files. It assumes that you are familiar with Active Server Pages, Visual Basic Scripting, and editing HTML files. Microsoft Access Product Support professionals do not support modification of any HTML, HTX, IDC, or ASP files.
Line 67: Line 67:
== RESOLUTION ==
== RESOLUTION ==


When you export a form to ASP, two files are created: the frame file and the layout file. The name of the layout file contains the name of the form followed by the letters &quot;ALX.&quot;<br />
When you export a form to ASP, two files are created: the frame file and the layout file. The name of the layout file contains the name of the form followed by the letters "ALX."<br />
<br />
<br />
The only way to remove the ampersand (&amp;) from the label caption is to manually edit the layout file. For example, the caption line in the file Suppliersalx.asp is<br />
The only way to remove the ampersand (&) from the label caption is to manually edit the layout file. For example, the caption line in the file Suppliersalx.asp is<br />


<pre class="fixed_text">  <PARAM NAME=&quot;Caption&quot; VALUE=&quot;&amp;Supplier ID&quot;>
<pre class="fixed_text">  <PARAM NAME="Caption" VALUE="&Supplier ID">
                 </pre>
                 </pre>
<br />
<br />
Line 78: Line 78:
You can open the ASP file in a text editor, such as Notepad, and change the caption line, for example:<br />
You can open the ASP file in a text editor, such as Notepad, and change the caption line, for example:<br />


<pre class="fixed_text">  <PARAM NAME=&quot;Caption&quot; VALUE=&quot;Supplier ID&quot;>
<pre class="fixed_text">  <PARAM NAME="Caption" VALUE="Supplier ID">
                 </pre>
                 </pre>


Line 100: Line 100:
<li>Start Microsoft Access 97 and open the sample database Northwind.mdb.</li>
<li>Start Microsoft Access 97 and open the sample database Northwind.mdb.</li>
<li>Open the Suppliers form in Design View.</li>
<li>Open the Suppliers form in Design View.</li>
<li>Change the Caption property of SupplierIDLabel to <span class="kbd userinput"> &amp;Supplier ID</span>. An underscore now appears under the &quot;S&quot; in &quot;Supplier.&quot;</li>
<li>Change the Caption property of SupplierIDLabel to <span class="kbd userinput"> &Supplier ID</span>. An underscore now appears under the "S" in "Supplier."</li>
<li>Close and save the form.</li>
<li>Close and save the form.</li>
<li>On the File menu, click Save As/Export.</li>
<li>On the File menu, click Save As/Export.</li>
<li>In the Save As dialog box, click &quot;To an External File or Database,&quot; and then click OK.</li>
<li>In the Save As dialog box, click "To an External File or Database," and then click OK.</li>
<li>In the &quot;Save Form 'Suppliers' In&quot; dialog box, select Microsoft Active Server Pages (*.asp) in the Save As Type box, and save the Suppliers.asp file in a folder on your Web server where you have Execute permission. Click Export.</li>
<li>In the "Save Form 'Suppliers' In" dialog box, select Microsoft Active Server Pages (*.asp) in the Save As Type box, and save the Suppliers.asp file in a folder on your Web server where you have Execute permission. Click Export.</li>
<li>In the Microsoft Active Server Pages Output Options dialog box, type a valid System DSN on your Web server in the Data Source Name box, and type the uniform resource locator (URL) on your server where the ASP file will be located in the Server URL box. Click OK.</li>
<li>In the Microsoft Active Server Pages Output Options dialog box, type a valid System DSN on your Web server in the Data Source Name box, and type the uniform resource locator (URL) on your server where the ASP file will be located in the Server URL box. Click OK.</li>
<li>Start Microsoft Internet Explorer 3.0 or later, or another Web browser program.</li>
<li>Start Microsoft Internet Explorer 3.0 or later, or another Web browser program.</li>
Line 110: Line 110:
<li><p>View the ASP file in a Web browser. Note that the Supplier ID label is displayed as:<br />
<li><p>View the ASP file in a Web browser. Note that the Supplier ID label is displayed as:<br />
</p>
</p>
<pre class="fixed_text">      &amp;Supplier ID
<pre class="fixed_text">      &Supplier ID
                         </pre></li></ol>
                         </pre></li></ol>


Line 119: Line 119:
== REFERENCES ==
== REFERENCES ==


For more information about access keys, search the Help Index for &quot;access keys,&quot; or ask the Microsoft Access 97 Office Assistant.
For more information about access keys, search the Help Index for "access keys," or ask the Microsoft Access 97 Office Assistant.


</div>
</div>

Latest revision as of 12:29, 21 July 2020

Article ID: 170691

Article Last Modified on 1/20/2007



APPLIES TO

  • Microsoft Access 97 Standard Edition



This article was previously published under Q170691

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


SYMPTOMS

When you export a form to ASP and view the ASP file in a browser, label controls with access keys are displayed with their literal caption text. For example, a form may contain a label control whose caption is &Supplier ID. When you view the form in Form view in Microsoft Access, the caption appears as Supplier ID with an underscore under the "S." However, the caption appears as &Supplier ID when you view the corresponding ASP file.

NOTE: This article contains information about editing ASP files. It assumes that you are familiar with Active Server Pages, Visual Basic Scripting, and editing HTML files. Microsoft Access Product Support professionals do not support modification of any HTML, HTX, IDC, or ASP files.

CAUSE

Access keys are not supported in a form that has been exported to ASP.

RESOLUTION

When you export a form to ASP, two files are created: the frame file and the layout file. The name of the layout file contains the name of the form followed by the letters "ALX."

The only way to remove the ampersand (&) from the label caption is to manually edit the layout file. For example, the caption line in the file Suppliersalx.asp is

   <PARAM NAME="Caption" VALUE="&Supplier ID">
                


Note that the value of the caption includes the ampersand.

You can open the ASP file in a text editor, such as Notepad, and change the caption line, for example:

   <PARAM NAME="Caption" VALUE="Supplier ID">
                

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior


  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.
  2. Open the Suppliers form in Design View.
  3. Change the Caption property of SupplierIDLabel to &Supplier ID. An underscore now appears under the "S" in "Supplier."
  4. Close and save the form.
  5. On the File menu, click Save As/Export.
  6. In the Save As dialog box, click "To an External File or Database," and then click OK.
  7. In the "Save Form 'Suppliers' In" dialog box, select Microsoft Active Server Pages (*.asp) in the Save As Type box, and save the Suppliers.asp file in a folder on your Web server where you have Execute permission. Click Export.
  8. In the Microsoft Active Server Pages Output Options dialog box, type a valid System DSN on your Web server in the Data Source Name box, and type the uniform resource locator (URL) on your server where the ASP file will be located in the Server URL box. Click OK.
  9. Start Microsoft Internet Explorer 3.0 or later, or another Web browser program.
  10. Type the URL in the address box of your Web browser to view Suppliers.asp, for example http://MyServer/Aspsamp/Suppliers.asp. Note that the URL depends upon where your files are located on the Web server computer.
  11. View the ASP file in a Web browser. Note that the Supplier ID label is displayed as:

           &Supplier ID
                            


REFERENCES

For more information about access keys, search the Help Index for "access keys," or ask the Microsoft Access 97 Office Assistant.


Additional query words: hot

Keywords: kbprb kbui KB170691