Query linked to form with textbox to search multiple fields

AWilderbeast

Registered User.
Local time
Today, 19:04
Joined
Sep 13, 2005
Messages
92
Right what im after sounds complicated but its quite simple.

I have a client database, in this database each client has 3 skill fields, i also have a form with a listbox and an unbound textboxes that are linked to the query so when the textbox is typed in the listbox updates.

Now ive sorted out the problem of not all fields showing it some of them are blank now the problem is.

When input text into one of the boxes the listupdates, now if theres text in two boxes. and theres data in one of each that matches it will show neither, because the query is looking for data that matches in both fields, now i need partial matches so it will give results of data in both fields.

not understanding fully what i mean?

i have zipped my db, if you open the db then open the form 'MainListRecTrades2nd' and fill in data in both primary and secondary trades that matches from the list you will see.

http://awilderbeast.com/CWSystem.zip

The solution i was thinking of would to have 1 textbox that searches all the fields and displays data from any of the fields in the list

Thanks for any help
 
Last edited:
Instead of putting the code in the On Change events of the text boxes, you can add a command button on the form and put the list box requery command in the On Click event of the button.

Hence, the user can fill in whichever text boxes he/she wants and then clicks on the command button to requery the list box.

^
 
its not a problem of querying the data, its that if there is data in two of the search boxes, then it will only bring up recruits with matching criteria for both, not if theres 1 or each
 
You have a design problem. You have a repeating group in your skill table. Instead of three fields for skills you should have one record for each skill. This makes what you want much more difficult to achieve.
 
i dont understand what you mean, what should i do?
 
Last edited:
Read up on normalis(z)ation. You have three different fields that all record a skill. You should have only one field recording one type of data so you should use up to three records with a field identifying which level, primary, secondary etc.
 
i read an artcile or two bout normalization, i sorta understand what its saying, but i dont have the slightest idea on how to implement it to make my search work.

such a noob and im under a deadline dont know what im gonna do!! gotta be done by tomorrow and only found out that the piece of s*** didnt work this morn
 
aw00t simple solution created, if anyone else is having this problem, simply create a query for each type of criteria you want and create a different list box for each criteria then link your search textbox to all three listboxes.

sorted!!!
 

Users who are viewing this thread

Back
Top Bottom