By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,929 Members | 631 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,929 IT Pros & Developers. It's quick & easy.

Query of a Query DataSheet

P: n/a
I am using MS Office Access 2003 (11.5614). My basic question is can
I run a query of a query datasheet. I want to use more that one
criteria and can not get that query to work. I thought I might be
able to accomplish the results in two steps by using two queries. If
this is possible how can I do it?

Thank you,

Stan Hanna

Sep 29 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Sat, 29 Sep 2007 09:39:17 -0700, Stan wrote:
I am using MS Office Access 2003 (11.5614). My basic question is can
I run a query of a query datasheet. I want to use more that one
criteria and can not get that query to work. I thought I might be
able to accomplish the results in two steps by using two queries. If
this is possible how can I do it?

Thank you,

Stan Hanna
You haven't given sufficient information for more than generic help,
but yes, you can use one query as the record source for another query.

You can also use a form in which to enter the parameters. Then
reference the relevant form controls in the query:

forms!FormName!ControlName

As long as the form is open, any query that refers to the form and
it's control will run with the correct criteria.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Sep 29 '07 #2

P: n/a
Stan wrote:
I am using MS Office Access 2003 (11.5614). My basic question is can
I run a query of a query datasheet. I want to use more that one
criteria and can not get that query to work. I thought I might be
able to accomplish the results in two steps by using two queries. If
this is possible how can I do it?

Thank you,

Stan Hanna
You can create a query and then use that query in another query.

If this is related to a form, you can use recordsets. Ex:
Dim r As recordset
DIm r1 As Recordset
set r = Forms!TheForm.Form.Recordsetclone
r.filter = "CustomerID = 1"
r.sort = "DateEntered"
Set r1 = r.OpenRecordset
Sep 30 '07 #3

P: n/a
Stan <st*******@hotmail.comwrote in news:1191083957.648184.270350
@k79g2000hse.googlegroups.com:
My basic question is can
I run a query of a query datasheet. I want to use more that one
criteria and can not get that query to work.
There's no problem in running a query of a query. (But I have no idea of
what you mean when you suggest running a query of a query datasheet).
Regardless, if you have six criteria, will you be happy with running a
query of a query of a query of a query of a query of a query?
And if you are, and the queries are saved queries, and something isn't
quite right, will it be easy for you to investigate just what that is?
And if you share your work, will Uncle Phil be able to figure just what
you are doing or have done there.

Why not ask about "I want to use more that one criteria", the problem
which you actually have?
Everybody should know how to write such a query, and by using your
suggested bypass, you will pass up the opportunity to learn that very
basic skill.
Posting a copy of your effort that doesn't "work" is likely to get a
helpful response quite quickly.
Unless it's ludicrous, of course. Then it will generate multiple
absurdities. Lately 75% of the questions and 85% of the answers here have
been ludicrous, so you'll just fit right in; no need to worry

--
lyle fairfield

Think free Aim Mail is a good deal? 4 gig storage! IMAP too! I have an
account. It has about two thousand messages stored on Aim's server. But I
can't access the account, nor the stored messages nor new messages. Do I
have the username and password right? I'm pretty sure because I can log
into the account with an instant message program like Miranda or
Trillian. And they can tell me I have fifteen new e-mails. But for two
weeks I can't login with the webmail interface, nor with IMAP, nor with
POP. So, be careful with Aim mail. Cuz there seems to be no recourse.
And, yes, I know the terms I agreed to specify AOL has no responsibility
whatever. But maybe this will help you remember those terms are for real
and your e-mail may disappear forever.



Sep 30 '07 #4

P: n/a
On Sep 29, 10:10 pm, lyle fairfield <lylef...@yahoo.cawrote:
Stan <stanha...@hotmail.comwrote in news:1191083957.648184.270350
@k79g2000hse.googlegroups.com:
My basic question is can
I run a query of a query datasheet. I want to use more that one
criteria and can not get that query to work.

There's no problem in running a query of a query. (But I have no idea of
what you mean when you suggest running a query of a query datasheet).
Regardless, if you have six criteria, will you be happy with running a
query of a query of a query of a query of a query of a query?
And if you are, and the queries are saved queries, and something isn't
quite right, will it be easy for you to investigate just what that is?
And if you share your work, will Uncle Phil be able to figure just what
you are doing or have done there.

Why not ask about "I want to use more that one criteria", the problem
which you actually have?
Everybody should know how to write such a query, and by using your
suggested bypass, you will pass up the opportunity to learn that very
basic skill.
Posting a copy of your effort that doesn't "work" is likely to get a
helpful response quite quickly.
Unless it's ludicrous, of course. Then it will generate multiple
absurdities. Lately 75% of the questions and 85% of the answers here have
been ludicrous, so you'll just fit right in; no need to worry

--
lyle fairfield

Think free Aim Mail is a good deal? 4 gig storage! IMAP too! I have an
account. It has about two thousand messages stored on Aim's server. But I
can't access the account, nor the stored messages nor new messages. Do I
have the username and password right? I'm pretty sure because I can log
into the account with an instant message program like Miranda or
Trillian. And they can tell me I have fifteen new e-mails. But for two
weeks I can't login with the webmail interface, nor with IMAP, nor with
POP. So, be careful with Aim mail. Cuz there seems to be no recourse.
And, yes, I know the terms I agreed to specify AOL has no responsibility
whatever. But maybe this will help you remember those terms are for real
and your e-mail may disappear forever.
Lyle,
I agree with you, I should learn to do it correctly, with a multi-
criteria query, but if you look at my posting in this discussion group
under "Query Conflict" you will see I have been trying without much
success. Now that I have a Query of a Query working, proving an
immediate answer to my needs, I will go back to working the multi-
criteria query problem. In the interim I thank you and all of the
other responders. I have learned a great deal.

Stan Hanna

Sep 30 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.