Report Filters?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set up a form filter to filter a report on the fly, I have
tried a few exampes of using the Combo Box filter Examples, but am
continually getting "Enter Parameter Value" Message and cannot get a response
on how to find the problem behind that.

does anyone know if any other examples out there that I can try?


Brook
 
Brook said:
I am trying to set up a form filter to filter a report on the fly, I have
tried a few exampes of using the Combo Box filter Examples, but am
continually getting "Enter Parameter Value" Message and cannot get a response
on how to find the problem behind that.

The Enter Parameter pop up box provides the parameter name.
That should give you a clue about where you've got the wrong
thing.

If the filter is specified in the report's record source
query, then the reference in the query's criteria for the
field would be something like:
FORMS!theform.thecombobox

OTOH, if you're using the OpenReport method's WhereCondition
argument to filter the report's dataset (recommended), then
you would write it something like:

If thefield is a numeric type:

DoCmd.OpenReport . . ., , , "thefield=" & Me.thecombobox

or, if thefield is a text type:

DoCmd.OpenReport ... ,,,"thefield=""" & Me.thecombobox &""""
 
Hello Marshall,

thank you for the response...

Based on your response I am not sure what method I am using... I am new to
Report Filters on the fly... but here is a general basis of what I am using:

tblinventory
rptInventory --> Based on my qryinventory
qryInventory
frmfilters
my combo filter boxes are based on my qryInventory

Does this help in any way in determining the issue?

Brook

if not... where should I look?
 
Hello Marshall...

Thank you for the reply...

I am really unsure where to go from here? I use a report based on a qry,
and my cbo boxes are based on the qry... here is a same of the code from one
of my cboboxes:

SELECT tblinventory.ordnum FROM tblinventory ORDER BY tblinventory.ordnum;


I'm not sure if this helps, but I don't know where to go from here?

Any Ideas?


Brook
 
I guess the first ting is to determine how you are opening
the report. Are you just selecting it in the Database
Window and clicking the Open button? From the query you
posted, which has no parameters, I would think you are not
doing this. More likely, you have a form with the combo box
and a command button to open the report.

If the latter is the case, then you should open the form in
design view and select the command button. Then view the
button's property sheet (View menu - Properties), locate the
OnClick property and click on the little [...] button in the
right margin. That should take you to the button's Click
event procedure. Look through the code to find the line
with OpenReport. You can then modify it along the lines
that I posted earlier.
--
Marsh
MVP [MS Access]

I am really unsure where to go from here? I use a report based on a qry,
and my cbo boxes are based on the qry... here is a same of the code from one
of my cboboxes:

SELECT tblinventory.ordnum FROM tblinventory ORDER BY tblinventory.ordnum;

 
Back
Top