ACC97: Dynamic Combo Box to Filter Access Data in IDC FormatID: Q165359
|
Moderate: Requires basic macro, coding, and interoperability skills.
You can filter Microsoft Access data in HTX/IDC format by specifying
criteria from a Web browser. One way that you can do this is to export a
parameter query from Microsoft Access to HTX/IDC format. An HTML file is
created, which enables you to type criteria into a text box in order to
filter the records returned to the browser. However, you may prefer to
select criteria from a combo box based on a table or query in the database.
To implement a combo box that you can use from a browser, you must create
an additional IDC file and a corresponding HTX file.
The following example uses the Northwind sample database. It assumes that
you have Microsoft Personal Web Server or Microsoft Internet Information
Server installed on your Web server computer.
NOTE: This article contains information about writing and editing IDC and
HTX files. This information is provided as is. Microsoft Access Technical
Support professionals do not support customizing your IDC or HTX files.
datasource: Nwind97
template: Custlist.htx
SQLStatement:
+SELECT customers.customerid, customers.companyname
+FROM customers
<HTML>
<TITLE>Customers</TITLE>
<BODY>
<FORM METHOD = "POST" ACTION = "/scripts/Orders_1.idc">
Select the customer whose orders you'd like to see:<BR>
<SELECT NAME = "customerid">
<%BeginDetail%>
<OPTION VALUE = <%customerid%>> <%companyname%>
<%EndDetail%>
</SELECT>
<P>
<INPUT TYPE = "Submit" VALUE = "Submit">
</BODY>
</HTML>
SELECT * FROM [Orders]
SELECT * FROM [Orders] WHERE customerid = '%customerid%'
For more information about creating a System DSN, search the Help Index for
"ODBC, Help files," and click the "Display the ODBC Help file" link. Then
search the ODBC Help Index for "system DSNs."
For more information about exporting a table to HTX/IDC, search the Help
Index for "IDC files," or ask the Microsoft Access 97 Office Assistant.
Keywords : kbinterop IntpWeb
Version : 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: May 17, 1999