Avatar of urjudo
urjudo
Flag for United States of America asked on

query problem

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
Microsoft Access

Avatar of undefined
Last Comment
John Tsioumpris

8/22/2022 - Mon
Dale Fye

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.
urjudo

ASKER
Sorry, I tried, it doesn't seem working.
ASKER CERTIFIED SOLUTION
Dale Fye

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
urjudo

ASKER
unfortunately, I just realized that I have to use two different query in my case, but thank you so much for your helped!!!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
John Tsioumpris

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