Thanks for the tip. I have made the change.
However, because my parameters are different lines they are "OR"
parameters.
I have 15 fields where I enter drug results. So my first criteria is
[Enter
Drug Name 1], and this criteria is under each field on seperate lines (so
user is prompted only once). then again on seperate lines I have my next
criteria [Enter Drug Name 2]
and so forth for a third drug. However, with this query, I get all the
records with Drug 1 and all records with drug 2. but I only want the
records
that have both Drug 1 and Drug 2]. So it's not filtering for both drugs,
but
for both drugs separately. It doesn't matter if the record has 7 drugs,
but
if that record has drug 1 AND drug 2 in any 2 of the 7 fields, the query
should only grab that record. I hope this makes sense. Similarly if I'm
looking ONLY for the records that have drug 1, drug 2 AND drug 3 in any of
those 15 fields.
I'm now learning access so you're help would be apprecitated.
Thanks. Ryan
Duane Hookom said:
Sounds like your table needs to be normalized. However you can use the
same
parameter prompt on multiple lines under multiple fields in the query
design
grid. You will be prompted only once.
--
Duane Hookom
MS Access MVP
Hi. your idea works, however, if I have 9 keys, then the user will be
prompted 9 times and have to enter the same string 9 times.
I want my query to search all 9 keys at once using one criteria.
for example: [Enter name]
i should only have to enter the name once and the query should search
all
9
keys and return all records with that name in any one of the 9 fields.
you're help woudl be appreciated.
Thanks.
Ryan
:
First, sounds like your design is flawed. You should most likely have
a
one-to-many database layout, but that aside...
In the criteria under each "key" field just put something like...
=[Enter Key To Search]
Place this on a different line in your query for each key. criteria
placed
on different lines creates and "or" condition, so if any of them
contains
the entered key, the record would be selected.
Rick B
I have 9 fields in one table - key1, key2,key3 etc up to key9.
I need to create a search that will search ALL these fields via the
user
entering a word and the search would retrieve all information on
candidates
with THAT specific word.....
Any ideas??
Many thanks in advance.