How do you setup a Query across multiple fields?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?
 
In the criteria field under each of your fields, you would put the same criteria (but do so on separate lines). Placing criteria on the same line creates an "AND" condition, but putting it on separate lines creates an "OR" condition.


field1 field2 field3
=[Enter Parameter]
=[Enter Parameter]
=[Enter Parameter]
 
Hyperboy said:
I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?


Use the **exact** same criteria for all three fields. Just
make sure you put them on different criteria rows to get the
OR operator.
 
Marshall Barton said:
Hyperboy said:
I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?


Use the **exact** same criteria for all three fields. Just
make sure you put them on different criteria rows to get the
OR operator.


Thank you very much, you both have been very helpful. That is exactly what I
was thinking of doing, but it seemed to me that it would create separate
parameter boxes. Thanks again.
 
Hyperboy said:
I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?
Marshall Barton said:
Use the **exact** same criteria for all three fields. Just
make sure you put them on different criteria rows to get the
OR operator.
Hyperboy said:
Thank you very much, you both have been very helpful. That is exactly what I
was thinking of doing, but it seemed to me that it would create separate
parameter boxes. Thanks again.


You're welcome, but it wouldn't have hurt to just give it a
try. After all, a Select query can't damage anything and
you may have gotten your answer faster than it took to wind
its way through the newsgroups ;-)
 
Marshall Barton said:
Hyperboy wrote:
I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?
Marshall Barton said:
Use the **exact** same criteria for all three fields. Just
make sure you put them on different criteria rows to get the
OR operator.
Hyperboy said:
Thank you very much, you both have been very helpful. That is exactly what I
was thinking of doing, but it seemed to me that it would create separate
parameter boxes. Thanks again.


You're welcome, but it wouldn't have hurt to just give it a
try. After all, a Select query can't damage anything and
you may have gotten your answer faster than it took to wind
its way through the newsgroups ;-)

True. I have noticed though that there seems to be multiple ways of doing
the same thing in Access. I was curious about getting validation to what I
wanted, and I was also curious if anybody had any other way of doing it.
Having to cut and paste 20 or 30 parameter queries across 20 to 30 different
fileds (if you had to) would be quite tedious.

Once again, thanks!
 
Hyperboy said:
I am looking to setup a query with Parameters across multiple fields.
Basically, I have field1, field2 and field3. In all 3 fields, there is the
capability to have the exact same phrase. The query would apply to all 3
fields on a OR basis. The problem is, I don't want to have to enter the
answer three times. Is there a way that once the query for field1 is
answered, it can distribute that criteria out to the next 2 fields as well?

ie. Criteria for field1 is [Is this a prerequisite of any course?]

I would like the criteria of field2 and field3 to be the answer to that
parameter query. How would I go about doing this?


:
Use the **exact** same criteria for all three fields. Just
make sure you put them on different criteria rows to get the
OR operator.
Hyperboy said:
Thank you very much, you both have been very helpful. That is exactly what I
was thinking of doing, but it seemed to me that it would create separate
parameter boxes. Thanks again.
Marshall Barton said:
You're welcome, but it wouldn't have hurt to just give it a
try. After all, a Select query can't damage anything and
you may have gotten your answer faster than it took to wind
its way through the newsgroups ;-)
Hyperboy said:
True. I have noticed though that there seems to be multiple ways of doing
the same thing in Access. I was curious about getting validation to what I
wanted, and I was also curious if anybody had any other way of doing it.
Having to cut and paste 20 or 30 parameter queries across 20 to 30 different
fileds (if you had to) would be quite tedious.

Once again, thanks!


Been there, done that and am quite familiar with tedious.

Not sure in this case but it's often easier to copy/paste
stuff in a query's SQL view than it is in the standard
design view.
 
Back
Top