Query that returns nothing

K

Keith

I'm hoping you can help me on an Access problem.



I have created a query that searches a table that you must enter data your
looking for through a pop up dialog (criteria = [Enter Pump Curve]. On the
form that reports the information I have a text box that shows the number
you entered for the [Enter Pump Curve] criteria which works fine as long as
one result is found reported back. If the number entered is not in the
table the text box stays blank but I would like the number that was searched
for to appear even if there are no results. Since it does not show this, a
person is unable to confirm the right number was type in the search box.



I have looked everywhere and tried many expressions such as
IIf([ImpellerCurve1]Is Null, [Enter Pump Curve],"") etc. etc.



Is there a way to do this?
 
G

Guest

Since you have the form already, use it for the criteria in the query, rather
than the popup.

Change [Enter Pump Curve] to [Forms]![formname]![controlname]
 
K

Keith

I tried this with no success but thanks for your help. Maybe I'm just not
doing something right.



Is there no simple way of capturing the data that is entered in the popup
box and display it in the form even if it's not found?



Maybe I'm not stating what I'm trying to do but I'll try to explain better.



I have a form called ImpellerCurveForm that is opened through a switchboard
command with the record source called ImpellerCurveQuery. When the form
opens, it starts the Query and a popup box appears asking for the
information I want to look for by setting Criteria to [Enter Pump Curve]
which then looks in the field ImpellerCurve1 in the table Pump_Parts. If it
finds a record that matches the input, let's say 432, it will show on the
form that shows, for example, "Stations with 432 Impeller" and then gives a
list of stations with that part.



Now the problem I am having is if there is no match to the input of 432, the
form shows

"Stations with Impeller". Even if there is no 432 in the table, I
would still like the statement to show "Stations with 432 Impeller" or you
would never know that you may have mistyped the number. This way if you
mistyped 431 in the box, the form would show "Stations with 431 Impeller"
and a person could see that was not intended because you were looking for a
432.



I hope I'm explaining this right and is my last stumbling block to
completing my project.

S.Clark said:
Since you have the form already, use it for the criteria in the query,
rather
than the popup.

Change [Enter Pump Curve] to [Forms]![formname]![controlname]


--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



Keith said:
I'm hoping you can help me on an Access problem.



I have created a query that searches a table that you must enter data
your
looking for through a pop up dialog (criteria = [Enter Pump Curve]. On
the
form that reports the information I have a text box that shows the number
you entered for the [Enter Pump Curve] criteria which works fine as long
as
one result is found reported back. If the number entered is not in the
table the text box stays blank but I would like the number that was
searched
for to appear even if there are no results. Since it does not show this,
a
person is unable to confirm the right number was type in the search box.



I have looked everywhere and tried many expressions such as
IIf([ImpellerCurve1]Is Null, [Enter Pump Curve],"") etc. etc.



Is there a way to do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top