View Full Version : Search


lead 27
02-07-2008, 08:11 AM
Hi

I am trying to create a search box on my form. I can create an unbound txt box and use a comand button to open a form and display a particular fields fine however this isnt quite what I want.

I want to be able to use an unbound txt box and be able to search different fields. So I would imagine it would be an unbound txt box followed by a list box (with the list of avalible fileds to search) then a command button.

Does anyone know if I am on the right track and any idea how to do this?

Thanks

John Big Booty
02-07-2008, 02:42 PM
Try this thread (http://www.access-programmers.co.uk/forums/showthread.php?t=116253) I think it's just what your looking for.

checker
02-07-2008, 03:07 PM
This might be too simple for your approach, but you can always built a query that combines the fields that need to be sortable into one "search" field, for example: Search: [Field1] & [Field2] & [Field3] etc
In the criteria for the search field, put the unbound field as a reference using a LIKE statement: LIKE "*" & forms.formname.[unboundfieldname] & "*"

I have done this in the past joining ssns, names and birthdates.