Help! on filtering a report using a form & query

A

Abbey Normal

Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the query.
I want the user to select the lookup field from a drop down combo box
And then run the query. If I change the query so the the criteria reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3" and I
get the desired results. It also works If I then run the report separately.
But, If I try to run it from the form, I select my collection (It's a two
column combo box, the first column has a width of 0) and then it prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value and
determine why its asking for "current"
Thank you............................
 
A

Abbey Normal

I'm not exactly understanding your question, but I can tell you If I debug
the select statement that the form is building (copied an existing one for my
purposes) I see now that it is actually putting the "3" in the criteria for
the criteria, which is correct. So that must mean the statement I am building
gives no results?
I also found out the current is a variable that is loaded during the forms
set up routine.
Wayne-I-M said:
Is the bound column set to the one contain the query criteria?

--
Wayne
Manchester, England.



Abbey Normal said:
Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the query.
I want the user to select the lookup field from a drop down combo box
And then run the query. If I change the query so the the criteria reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3" and I
get the desired results. It also works If I then run the report separately.
But, If I try to run it from the form, I select my collection (It's a two
column combo box, the first column has a width of 0) and then it prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value and
determine why its asking for "current"
Thank you............................
 
A

Abbey Normal

Hi Wayne,
What I found out is that its building a select statement with criteria of
Current = true AND Collection = 3.
Then, it will still prompt me for the parameter of current. If I type in
"true" I get the correct report.
My question is why is it prompting me for this parameter if it already
loaded it in the select statement.
Thank you,

Abbey Normal said:
I'm not exactly understanding your question, but I can tell you If I debug
the select statement that the form is building (copied an existing one for my
purposes) I see now that it is actually putting the "3" in the criteria for
the criteria, which is correct. So that must mean the statement I am building
gives no results?
I also found out the current is a variable that is loaded during the forms
set up routine.
Wayne-I-M said:
Is the bound column set to the one contain the query criteria?

--
Wayne
Manchester, England.



Abbey Normal said:
Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the query.
I want the user to select the lookup field from a drop down combo box
And then run the query. If I change the query so the the criteria reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3" and I
get the desired results. It also works If I then run the report separately.
But, If I try to run it from the form, I select my collection (It's a two
column combo box, the first column has a width of 0) and then it prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value and
determine why its asking for "current"
Thank you............................
 
A

Abbey Normal

Okay, nevermind. I took out that variable "current" and replaced it with a
field from the database that I know is never null, and it's working. I think
the person used this as a way to start the select criteria and then add on a
bunch of criteria. But thanks for being there!


Abbey Normal said:
Hi Wayne,
What I found out is that its building a select statement with criteria of
Current = true AND Collection = 3.
Then, it will still prompt me for the parameter of current. If I type in
"true" I get the correct report.
My question is why is it prompting me for this parameter if it already
loaded it in the select statement.
Thank you,

Abbey Normal said:
I'm not exactly understanding your question, but I can tell you If I debug
the select statement that the form is building (copied an existing one for my
purposes) I see now that it is actually putting the "3" in the criteria for
the criteria, which is correct. So that must mean the statement I am building
gives no results?
I also found out the current is a variable that is loaded during the forms
set up routine.
Wayne-I-M said:
Is the bound column set to the one contain the query criteria?

--
Wayne
Manchester, England.



:

Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the query.
I want the user to select the lookup field from a drop down combo box
And then run the query. If I change the query so the the criteria reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3" and I
get the desired results. It also works If I then run the report separately.
But, If I try to run it from the form, I select my collection (It's a two
column combo box, the first column has a width of 0) and then it prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value and
determine why its asking for "current"
Thank you............................
 
W

Wayne-I-M

Hi

I am a little confused by the whole thngs. what does this mean
What I found out is that its building a select statement

What is build the statement.

It may be an idea to copy the form, query and report (don't forget to
redefine the source for the form and report to the new query name).

Cut out everything except for th QBF and see if this works. If not then the
souce is wrong (on your form). Try using the build option in the criteria
row of the query. etc, etc.


--
Wayne
Manchester, England.



Abbey Normal said:
Hi Wayne,
What I found out is that its building a select statement with criteria of
Current = true AND Collection = 3.
Then, it will still prompt me for the parameter of current. If I type in
"true" I get the correct report.
My question is why is it prompting me for this parameter if it already
loaded it in the select statement.
Thank you,

Abbey Normal said:
I'm not exactly understanding your question, but I can tell you If I debug
the select statement that the form is building (copied an existing one for my
purposes) I see now that it is actually putting the "3" in the criteria for
the criteria, which is correct. So that must mean the statement I am building
gives no results?
I also found out the current is a variable that is loaded during the forms
set up routine.
Wayne-I-M said:
Is the bound column set to the one contain the query criteria?

--
Wayne
Manchester, England.



:

Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the query.
I want the user to select the lookup field from a drop down combo box
And then run the query. If I change the query so the the criteria reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3" and I
get the desired results. It also works If I then run the report separately.
But, If I try to run it from the form, I select my collection (It's a two
column combo box, the first column has a width of 0) and then it prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value and
determine why its asking for "current"
Thank you............................
 
G

Guest

Wayne-I-M said:
Hi

I am a little confused by the whole thngs. what does this mean
What I found out is that its building a select statement

What is build the statement.

It may be an idea to copy the form, query and report (don't forget to
redefine the source for the form and report to the new query name).

Cut out everything except for th QBF and see if this works. If not then
the
souce is wrong (on your form). Try using the build option in the criteria
row of the query. etc, etc.


--
Wayne
Manchester, England.



Abbey Normal said:
Hi Wayne,
What I found out is that its building a select statement with criteria of
Current = true AND Collection = 3.
Then, it will still prompt me for the parameter of current. If I type in
"true" I get the correct report.
My question is why is it prompting me for this parameter if it already
loaded it in the select statement.
Thank you,

Abbey Normal said:
I'm not exactly understanding your question, but I can tell you If I
debug
the select statement that the form is building (copied an existing one
for my
purposes) I see now that it is actually putting the "3" in the criteria
for
the criteria, which is correct. So that must mean the statement I am
building
gives no results?
I also found out the current is a variable that is loaded during the
forms
set up routine.
:

Is the bound column set to the one contain the query criteria?

--
Wayne
Manchester, England.



:

Hi. I've got a database with lookup fields.
I have a form, a query and a report whose record source is the
query.
I want the user to select the lookup field from a drop down combo
box
And then run the query. If I change the query so the the criteria
reads:
[Forms]![frmCloseOutFilter]![txtCollection]
and then run it, it will prompt me for the collection, I type a "3"
and I
get the desired results. It also works If I then run the report
separately.
But, If I try to run it from the form, I select my collection (It's
a two
column combo box, the first column has a width of 0) and then it
prompts me
for Enter Parameter Value and it says current.
Can someone help me figure out how to pass the actual look up value
and
determine why its asking for "current"
Thank you............................
 
N

noreply@noreply

NHN is headquartered in Seongnam, Southern Korea, with offices in Nippon, Container With umteen than eighter ten subscribers, Ground of Warcraft EQ2 plat[/url:bxf53929]dominates the online turn activity but some sinewy rivals are ride up to know it on. Gaute Godoger, manlike administrator at Funcom, said ordered was harmonic for the wellbeing of the online deflexion c (http://www.ugamegold.com/c_EQ2-Sale/:bxf53929).
 

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