using a query for the criteria in another query

I would like to use a query that pulls a particular group of Medical record numbers for the criteria of an append query.   I have build the query and just need to know the format for the criteria.

mwolfe83Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

neeraj523Commented:
hello

not clear what exactly you want to do.. better to post what you have already

Are you looking to insert/append rows in a table pulling it from other table ? if so, here is a solution

INSERT INTO Table1(Col1, Col2) SELECT Col1, Col2 FROM Table2
Rey Obrero (Capricorn1)Commented:
...
where [recNumbers] in (select [recNumbers] from TableX )

or you could include another where  clause in your subquery

basically that is the syntax or you can use Joins which will be faster


post more info..
Rey Obrero (Capricorn1)Commented:
< I have build the query and just need to know the format for the criteria.>

post the sql of your query
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

mwolfe83Author Commented:
Seeing that I'm not the best at this...This is the append query:

INSERT INTO CCH_VISIT
SELECT DCCDB_VISIT.*
FROM DCCDB_VISIT;


But I only want to select records that have records from query(qryotwdpatients)
INSERT INTO CCH_VISIT
SELECT DCCDB_VISIT.*
FROM DCCDB_VISIT;

Open in new window

Rey Obrero (Capricorn1)Commented:
INSERT INTO CCH_VISIT
SELECT DCCDB_VISIT.*
FROM DCCDB_VISIT
Where DCCDB_VISIT.RecordNumber In(Select RecordNumber from qryotwdpatients)

change RecordNumber to actual name of the field

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mwolfe83Author Commented:
Again, thank you capricorn1.  You were able to interpret by incomplete and miss-worded question to give me a perfect solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.