Hello all
I have already created an ASP search page that allows me to type a surname into a text field, and view the results (taken from a SQL table) in a table on the same page.
I want to expand this to allow the user to type in their chosen search word, and then select which field they would like to search on. i.e ...
Search text box: Jones Search Type: Surname
First Name
Department
So they can now type in either a first name, Surname or department name - and the results will either show up in the same table, or on a new form, whichever is easiest!.
I have found a tutorial which does kind of what I want ( but a)I cant get it to work, and b) its not in MX - so I cant find half the things on there!
So, my question is this. Can I just add a drop down list onto my current form, and change the below SQL code to look at the selection from this box, and then search on the relevant field. Or is it more complicated than that?
SQL Code: SELECT TelephoneDetails.[Tel Number], TelephoneDetails.[Internal Ext Number], TelephoneDetails.[Member Of Hunt Group], TelephoneDetails.[Hunt Group Number], Employees.[First Name], Employees.Surname, Employees.EMail_Address, Employees.Department, Employees.[Office Location], Employees.[Responible To], Employees.Manager, Employees.PhotoLocation
FROM TelephoneDetails INNER JOIN Employees ON TelephoneDetails.[E Number] = Employees.[E Number]
WHERE SOUNDEX(Surname) = SOUNDEX('MMColParam') OR Surname like 'MMColParam' + '%'
ORDER BY [First Name];
Does anyone know of a tutorial that I can look at? Or can someone adjust the above code to suit?
Cheers in advance guys - sorry for the HUGE post!
Jusenkyo
I have already created an ASP search page that allows me to type a surname into a text field, and view the results (taken from a SQL table) in a table on the same page.
I want to expand this to allow the user to type in their chosen search word, and then select which field they would like to search on. i.e ...
Search text box: Jones Search Type: Surname
First Name
Department
So they can now type in either a first name, Surname or department name - and the results will either show up in the same table, or on a new form, whichever is easiest!.
I have found a tutorial which does kind of what I want ( but a)I cant get it to work, and b) its not in MX - so I cant find half the things on there!
So, my question is this. Can I just add a drop down list onto my current form, and change the below SQL code to look at the selection from this box, and then search on the relevant field. Or is it more complicated than that?
SQL Code: SELECT TelephoneDetails.[Tel Number], TelephoneDetails.[Internal Ext Number], TelephoneDetails.[Member Of Hunt Group], TelephoneDetails.[Hunt Group Number], Employees.[First Name], Employees.Surname, Employees.EMail_Address, Employees.Department, Employees.[Office Location], Employees.[Responible To], Employees.Manager, Employees.PhotoLocation
FROM TelephoneDetails INNER JOIN Employees ON TelephoneDetails.[E Number] = Employees.[E Number]
WHERE SOUNDEX(Surname) = SOUNDEX('MMColParam') OR Surname like 'MMColParam' + '%'
ORDER BY [First Name];
Does anyone know of a tutorial that I can look at? Or can someone adjust the above code to suit?
Cheers in advance guys - sorry for the HUGE post!
Jusenkyo