PROBLEM - Report based on query that has criteria based on listbox

  • Thread starter Thread starter sk
  • Start date Start date
S

sk

I'm trying to get a report to load that is based on a criteria which is set
according to the value of a listbox on a form. (all in 2007) When I open
the report (by clicking on button) Access asks for the parmeter [which is the
listbox.value]

The report will run fine if I enter the correct value but I don't want it to
ask.

this is the format of the criteria in the query:
[Forms]![frmMain]![lstPRRListing] The listbox does have a value when the
report is opened and the form is never closed.

Any thoughts on why the query can not see the listbox?
 
Is the listbox's MultiSelect property set to SIMPLE. If not, that is your
problem.



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
it is set to NONE. I had it working on a different form with the same
setting. I can not figure out what is different between the two forms.

John Spencer said:
Is the listbox's MultiSelect property set to SIMPLE. If not, that is your
problem.



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
I'm trying to get a report to load that is based on a criteria which is set
according to the value of a listbox on a form. (all in 2007) When I open
the report (by clicking on button) Access asks for the parmeter [which is the
listbox.value]

The report will run fine if I enter the correct value but I don't want it to
ask.

this is the format of the criteria in the query:
[Forms]![frmMain]![lstPRRListing] The listbox does have a value when the
report is opened and the form is never closed.

Any thoughts on why the query can not see the listbox?
.
 
Whoops. NONE is the correct setting.

Could you show us the query that the report is using (View: SQL then copy and
paste)?

Is it possible that you have misspelled the reference to the listbox.
For instance could it be that
[Forms]![frmMain]![lstPRRListing]
should be
[Forms]![frmMain]![lstPRListing]
(note the dropped double R in lstPRRListing).

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
it is set to NONE. I had it working on a different form with the same
setting. I can not figure out what is different between the two forms.

John Spencer said:
Is the listbox's MultiSelect property set to SIMPLE. If not, that is your
problem.



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
I'm trying to get a report to load that is based on a criteria which is set
according to the value of a listbox on a form. (all in 2007) When I open
the report (by clicking on button) Access asks for the parmeter [which is the
listbox.value]

The report will run fine if I enter the correct value but I don't want it to
ask.

this is the format of the criteria in the query:
[Forms]![frmMain]![lstPRRListing] The listbox does have a value when the
report is opened and the form is never closed.

Any thoughts on why the query can not see the listbox?
.
 
Back
Top