query problem

urjudo
urjudo used Ask the Experts™
on
Hi Experts,
Happy New Year!!!  I have a query question and do not know if this is possible to do, if it is then how?  I have a query that has two different fields, one is "case#" and other one is "File#", is any way I can combine this two fields into one field like an Expr field?  The reason I'm ask is because users need to enter either field to print out a same report, instead create two different queries,  I want to merge two fields into one field in one query, can anyone help?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
How about something like a parameter query:

Parameters [CaseOrFile] integer;
SELECT *
FROM yourTable
WHERE [Case#] = [CaseOrFile] OR [File#] = [CaseOrFile]

This would popup an inputbox when the user runs the query, and assumes that the values in the Case# and File# columns are numeric.

Author

Commented:
Sorry, I tried, it doesn't seem working.
Owner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Commented:
try:

PARAMETERS [CaseOrFile] Long;

Author

Commented:
unfortunately, I just realized that I have to use two different query in my case, but thank you so much for your helped!!!
John TsioumprisSoftware & Systems Engineer

Commented:
Can you give a sample along with some more info...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial