Text Box Search

J

Jim

Is it possible to use a Query to search for terms in a text box? I
had the bright idea to cut down on key strokes through a form by using a
code for a number of entries instead of pull down lists and or yes/no
fields. However I'm unable to make a Query that will do the job I want.

A text box would look something like the following and I'd be wanting
to search on any term or combination of terms entered.

*Eduard 0716. KB. MC. LD. PR. DB. SEC. [and so on.....]

If it can't be done I guess yes/no fields would be my next best bet.

Thank you. cheers - Jim.
 
J

John Spencer

Dp you have all the codes in ONE field or in multiple fields.

If in one field, you can search for one value using criteria like
Like "*" & [Find code] & "*"

Finding a combination of terms with that structure is much more difficult.


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
K

Klatuu

A List Box set to Multi Select might be the answer. See VBA Help for the
Items Selected property. It will show you how to loop through the selected
items. I can't give much more info because I don't know how you are doing
the search.
 
J

Jim

Jim said:
Is it possible to use a Query to search for terms in a text box?
I had the bright idea to cut down on key strokes through a form by using
a code for a number of entries instead of pull down lists and or yes/no
fields. However I'm unable to make a Query that will do the job I want.

A text box would look something like the following and I'd be
wanting to search on any term or combination of terms entered.

*Eduard 0716. KB. MC. LD. PR. DB. SEC. [and so on.....]

If it can't be done I guess yes/no fields would be my next best bet.

Thank you. cheers - Jim.


********** If anyone had a reply to this question I'd request a reprint.
My IP failed to bring in any messages from this newsgroup for the last
four days but today seems to be back in business. So if anyone replied
I'd appreciate a reprint - if no one replied - oh well :)

Cheers and thanks again. Jim.
 
J

John W. Vinson

Jim said:
Is it possible to use a Query to search for terms in a text box?
I had the bright idea to cut down on key strokes through a form by using
a code for a number of entries instead of pull down lists and or yes/no
fields. However I'm unable to make a Query that will do the job I want.

A text box would look something like the following and I'd be
wanting to search on any term or combination of terms entered.

*Eduard 0716. KB. MC. LD. PR. DB. SEC. [and so on.....]

If it can't be done I guess yes/no fields would be my next best bet.

Thank you. cheers - Jim.


********** If anyone had a reply to this question I'd request a reprint.
My IP failed to bring in any messages from this newsgroup for the last
four days but today seems to be back in business. So if anyone replied
I'd appreciate a reprint - if no one replied - oh well :)

Cheers and thanks again. Jim.

I don't think I replied but....

Storing multiple disparate pieces of information in one field is NOT a good
idea. It will make data entry HARDER not easier - with autocomplete a textbox
can fill in SEC with two keystrokes (S and <Tab>) if that's the only code
beginning with S; you won't get typos like DBB where DB was intended; you will
be able to *SEARCH* your data effectively rather than using convoluted
substring queries.

Yes/no fields would be a tiny bit better but still not good.

Would a multiselect Listbox (where the user can simply click on the desired
entries) work? Or a Subform with one code per row?

John W. Vinson [MVP]
 

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