Hello, all. I'd love it if one of you could help me solve the latest conundrum.
I have two tables that I want to query with a user-specified parameter. There will only ever be one result in the query, which comes from one table or another, but not both. The query will return three fields for each of the two tables, and the fields are ostensibly the same (Company Name, Last Update, and Notes in one, and Company Name, LastUpdate, and Status in the other). I have two questions. Short of building two separate queries (easier to build, but that means two searches for the end users instead of one), is there a way to specify the same parameter in two different criteria fields? The parameter would be
but the result could come from either one of the Company Name fields. Sort of like an OR qualifer, but in this case the two "values" would really be the same value which could come from one of two fields. Next, since only three of the six fields will ever return a value on any given query, is there a way to specify that if a field is empty, that its box be hidden, rather than displayed empty? That question is more a matter of the report, rather than the query, but perhaps there's something I need to be aware of on the query level.
O, and one last one: how should I set up the relationships in this query? If I choose "only where both rows are equal," I'll never get any results, and if I choose either one of the variations on "show all the results from this table and only the ones from the other which are equal," it will amount to basically the same thing, I think - I'll automatically exclude whatever record I'm querying for. Shoulds I just delete the relationship link and have the two tables unjoined within the query, or will that screw things up?
Thanks for any advice anyone can offer!
- Spherey
I have two tables that I want to query with a user-specified parameter. There will only ever be one result in the query, which comes from one table or another, but not both. The query will return three fields for each of the two tables, and the fields are ostensibly the same (Company Name, Last Update, and Notes in one, and Company Name, LastUpdate, and Status in the other). I have two questions. Short of building two separate queries (easier to build, but that means two searches for the end users instead of one), is there a way to specify the same parameter in two different criteria fields? The parameter would be
Code:
[Type the Company Name],
O, and one last one: how should I set up the relationships in this query? If I choose "only where both rows are equal," I'll never get any results, and if I choose either one of the variations on "show all the results from this table and only the ones from the other which are equal," it will amount to basically the same thing, I think - I'll automatically exclude whatever record I'm querying for. Shoulds I just delete the relationship link and have the two tables unjoined within the query, or will that screw things up?
Thanks for any advice anyone can offer!
- Spherey