Close to what I'm looking for. First of all, I tried
and added that search box on my dap but I got an "unknown" error line 116 (how do I find the right line if I want to fix the error?) Also, If I used that search tool on a separated page (small popup window), how can I tell the system to search on my main page and not on that search window? Here is the code anyway:
'-----------------------------------------------------------------------
'This routine searches all fields in the defaultrecordset for something
'entered by a user in a Search text box. It passes through each field
'the recordset until it finds a match.
'-----------------------------------------------------------------------
dim i 'Counter variable
dim rs 'ADO recordset object
dim fld 'ADO field object
dim FieldCount 'Number of fields in the recordset
FieldCount = MSODSC.DefaultRecordset.Fields.Count
'This will return the default recordset on the page
'in this case, the Customers table.
set rs = MSODSC.DefaultRecordset
for i = 0 to FieldCount - 1
'get a field object
set fld = rs.Fields(i)
'0 = Skip no records
'1 = Search forward
'1 = Start with the first record
rs.Find fld.name & " = '" & txtSearch.value & "'", 0, 1, 1
'Check for EOF. If at EOF but have not exhausted
'all the fields, then reset to the first position in the
'recordset. Otherwise, if a match was found, exit the loop.
if rs.EOF then
rs.MoveFirst
else
exit for
end if
next
'Clean up.
set fld = nothing
set rs = nothing
Now, this is nice to have but it's also incomplete. I need to have a pop up window (how do I set the hyperlink so a new page appears in a different window?) with differents DHTML drop-down and the user will select any of them to find the record(s) he wants. The main page will be filtered depending of what the user will choose in those lists.
"show records where field village = Svillage and/or field category = SCategory and/or field Status = SStatus and/or field TITLE = STitle or any part of text in STitle"
Then user will click on the CmdFind button, this window will close and he will be back to the main page and will see the results of this search.
??