Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access Pages

Status
Not open for further replies.

Linguist

Technical User
Jul 11, 2000
40
0
0
US
I have created a DAP and am trying to add some ActiveX controls to it.

I want to be able to prompt the user for word or several words and then have the DAP retrieve all the records that contain the word(s) and display them (the records) as a new RecordSet.

Here is the code that I have so far:

<SCRIPT event=onclick for=Command0 language=vbscript>
<!--
Dim rs
Dim strSearch
Set rs = MSODSC.DataPages(0).Recordset.Clone

strSearch = inputbox(&quot;Please enter a Locality: &quot;)
MSODSC.DataPages(0).Filter = &quot;Locality= '&quot; & strSearch & &quot;'&quot;
MSODSC.DataPages(0).Filter = adFilterNone
-->
</SCRIPT>

I want to use either the Filter property or an SQL query. How do I code either one in VBScript?

Any and all suggestions would be appreciated.
Thanks
 
Try

MSODSC.DataPages(0).Recordset.Filter = &quot;Locality= '&quot; & strSearch & &quot;'&quot;

Although, I'm not sure if that will make the page refresh/reload. Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top