Re: Query to search entire record, not one field?



To search based on a filed in a form that may or may not contain a value,
you'd use...

Like Forms![MySearchFormName]![MySearchFieldName] & "*"

Putting this in all the various fields in your query would pull values that
match if the user had made an entry. If no entry was made for a particular
field, then all the values in that field would be valid.

--
Rick B



"consjoe" <consjoe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BE45E375-8EE8-48ED-BC84-EE30F1C30CB5@xxxxxxxxxxxxxxxx
> I have a form based on a table with 20 fields. My clients want the
ability
> to search all fields to find the record they are looking for. Is there a
way
> for me to create a form (with all 20 fields) where they can chose which
> fields to search by and those records come up?
> Ex. I know that state, company, and first name of a record I need. I go
> into the 'Search Form' and type that information in and that record is
> retrieved.
> It is kind of like an and/or type of query but they need to be able to
> choose which fields to search by and leave the others blank.
> Thanks in advance.
>


.



Relevant Pages