As I stated in my first reply in this thread:
"You can't reference the [] parameter from a
query if there are no records returned."
So the following expression will not work:
= "No records for Store " & [Enter Store Number]
I don't recall stating that a form should be on the same record that you
run
the report for.
--
Duane Hookom
MS Access MVP
--
D said:
Hi Duane:
I had the form open before; but I did not know that should be on the
same
record that you run the report for.
Thanks a lot; I will try Debie's idea.
Dan
:
YOu need to replace the parameter with a reference to your control on
your
form. The form must be open.
If this doesn't work, come back with the error and the control source.
--
Duane Hookom
MS Access MVP
--
Hi Duane:
I get an error:#Name?; the form that I am referring the name of the
store
is
the amin form; does not have any relation with the query or the
report;
should the criteria come from a combo box/input form?
Thanks,
Dan
:
You can't reference the [] parameter from a query if there are no
records
returned. You should use a reference to a control on a form for
your
criteria rather than a parameter prompt. You could then use a text
box
like:
=IIf([HasData] = 0, "There are no records for store: " &
Forms!frmA!txtStoreID , "")
--
Duane Hookom
MS Access MVP
Hi:
I have a report based on a query; the user should enter a
criteria
from
the
query when runs the report; for example [enter store number].
I would like to show the store number in the report when there
are
no
records; or some message, like "No records for that store"
How do I do that?
Thanks,
Dan