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 strongm 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 and Find

Status
Not open for further replies.

Krukloaf

Programmer
Jun 28, 2002
9
US
Hello,
I'm trying to create a page where the user selects an item from a combobox and the rest of the textboxes on that page will display the fields that conains that record's info.

I'm using the find method:
MSODSC.CurrentSection.DataPage.Recordset.Find ("[CRF ID] =" & cbox.value)
but this doesn't seem to be working right.

Any suggestions?
 
This worked for me:
MSODSC.CurrentSection.DataPage.Recordset.Find "[CRF ID] =" & cbox.value,,,1

Notice I got rid of the parenthesis and added ,,,1. The one tells it to start the search at record 1. If it's not there I believe it starts its search from the current record.
 
hmm, it still won't update the text boxes.

What event should I place the script in regarding the combobox? And is there any update or requery method I need to call afterwards?
 
All I had to do was issue the find command via the OnChange event of the combobox. Upon issuing the command, the record was displayed. Here's my code:
Code:
<SCRIPT LANGUAGE=vbscript FOR=cbox EVENT=onchange>
<!--
MSODSC.CurrentSection.DataPage.Recordset.Find &quot;[CRF ID] =&quot; & cbox.value,,,1
-->
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top