:
Christina,
When you removed the criteria, and got all records back... did you get
prompted at all??
I assuming you did not... but we must determine that.
That means that, in the query, we don't have another similar
parameter.
So I'm suspecting that your criteria is not addressing the combo value on
the form properly.
What is the exact Name of your form, and what is the exact Name of the
combobox on that form? Not the field/s that the combo may display... the
actual Name of the Combobox itself.
Here's an example. If you had this setup...
Form name = frmMyDialogForm
Combobox name = cboNameCriteria
Then your criteria in the query would be...
Forms!frmMyDialogForm!cboNameCriteria
I want to make sure you're referring to the combobox Name in your
criteria, not the field name of the value that's displayed/selected.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
:
What happened when you followed my previous instructions?
Leave the form open with a legitimate value in the combo, and run
the
query behind your main report.
Does that work, and only return just the record/s you want?
If not, remove the criteria from your query and run again.
Does your query return ALLl the records... from which you want to
further
filter when we add the criteria back?
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
:
Christina,
If your saying the records returned by the 2 subreports are
controlled
by
the CustName on the main report, then there's no need for calling
the
CustName criteria in either subreport. The Parent/Child
relationship
bewteen the main and subs will handle that. The subs should only
display
records that match the CustName on the main... by thier
relationship.
You should only need a CustName criteria (refering to your form
combo)
in
the query for the main report. The subreports by thier
relationship
to
the
main, are slaves to the main report.
But... if you're using just CustName to criteria the records
returned
by
your query/report, that is wrong. It may work now, but it's poor
design.
You should be using a unique key field value in your Customer table
(like
CustID) to associate to other tables, and exactly identify that
Customer.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
:
Christina,
First, don't name a field [Name]. It's reserved word. Call
it
CustName
or something like that. Do that before going any further. Of
course,
edit
your form and the report query criteria accordingly.
[Forms]![Names]![CustName]
Next, as I wrote previously in another thread...
If you multiple queries behind your report, only one of them
should
call
for the Parameter. You let the queries deliver "all" records,
and
after
selecting the fields for the report query, that's where the
ParameterIf
the
"Name" parameter is included in several of your
queries, you're probably getting a prompt for each one.
Forget about the report right now, and just run the query
behind
it.
Select a legitimate name on your criteria form, and open the
report.
While the criteria form is still Open, go into design mode for
the
report.
Open and run the query behind the report. Does the query run
clean,
with
out prompts, and display the data you want? (using the CustName
form
criteria)
If not, then the problem is in the query... so far...
If it runs clean and displays the data you requested
according
to
the
form criteria, then try the report (still with the criteria form
Open).
Let us know how you made out, up to this point...
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
message
I have a query that prompts for input of criteria. I created a
form
(named
it NAMES) and created a combo box, from a table that has the
list
of
criteria. Eg names and SSN. so I can choose the name. I then
put
a
button
to
run the query.
In the query criteria I put [Forms]![names]![name].
FRom the comco box I choose the name of the person I want the
query
to
find,
but when I click the button the enter parameter bopx pops up
showing
[Forms]![names]![name] anI still need to enter the name in the
box.
What
am
I missing.
Thanks
Christina
Thanks.
Let me explain further. My report actually has two sub reports,
which
run
on independent queries, for all queries (3) the criteria is NAME.
I
will
change that as per your suggestion.
To narrow down and test, I created a form to run just one report.
I
put
in
the criteria of the query [forms]![names]![name]
On the form I created a button to run the report, and a combo box
to
choose
the name from. I choose the name. but when I click to run the
report,
my
report has headers but no data.
Christina
Please bear with me.
I understand. I am new at this , so my design may be cumbersome.
However,
like I said in my last post, I am focussing on just one query and
report
and
trying to set up the form. But it does not work see below
To narrow down and test, I created a form to run just one report. I
put
in the criteria of the query [forms]![names]![name]
On the form I created a button to run the report, and a combo box to
choose the name from. I choose the name. but when I click to run
the
report, my
report has headers but no data.
Christina
I did as you instructed. The query prompts for a criteria, with
the
ENTER PARAMTER BOX showing Forms!Names!name. If I dont input a
value
I get a blank query. When I remove the criteria from the query, ALL
records are returned.
I thought you had given up on me!!
answer to your question: When I got all the records I did not get a
prompt.
I renamed my form and used your example as above. Put the criteria as
above
in my query. Right click on the combo box , in property put the name as
you
have above. Open form. I select a name, and when I click, I get all the
records.
My combo box is based on one of the two tables in the query.
So I have ensured that the criteria in my query is referencing the combo
box. Before, it was as you mentioned, it was referencing the name of the
field.
However it still does not work.