Search form

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I would like to build a search form to select my desired record(s). My
initial plan is to pull all condition fields into one field and use
parameter query to select the records. However, I need to select more than
one condition. Is there any example for me to have reference how to
construct such search form effectively.

Thanks,

Scott
 
Here's one way to quickly create an effective search tool on multiple text
fields. Create a single field in your query that concatenates the different
fields with an odd delimiter (something that is highly unlikely to be part of
a record, like "||". You'll have to decide whether you want to implement an
AND or an OR search on multiple inputs for the query criteria.

For AND:
Like "*" & input1 & "*||*" & input2 & "*||*" & input3 & ...

For OR:
Like "*" & input1 & "*||*||*||*..." OR Like "*||*" & input2 & "*||*||*..."
Depending on the data and the desired results, you might not even need to add
the delimiters.

If you have a lot of criteria, this could get kind of long. Naturally, use
wildcards that are applicable to your situation. HTH
 
Back
Top