How can i create a search facility

L

Leigh Swift

Hello all, as part of my database, i have created a page which displays employees, as im sure you can imagine, the list of employees is simply huge, so a simple combo box filter on the page (Access 2000) is not adequate.. I'd like something so that a user can type data in a selection of text boxes, like employee ID or name etc, so that results will then be displayed according to this input..

can anyone please explain how i might do this? (concidering i've only been using Access for a couple of weeks!!

thanks in advanc
Leigh
 
S

siddartha

Get the type of value user types...use IsNumeric()..
uild a query and fire and fet the result

dim strsql as strin

if IsNumeric(textbox.text) the
strsql= " select * from tablename where employee id =" & cint(textbox.text
els
strsql= " select * from tablename where employee name ='" & textbox.text & "'
end i

fire this dynamic query against database..

thanks and regard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top