Okay... Yes it is currently in the code (cmbGroupName) which is:
========
If Me.cmbGroupName.Value = "All" Then
strProcessedWhere = ""
strDepositWhere = ""
strAnd = ""
End If
strDeposit = strDepositWhere & strAnd & strDepositDate
strProcessed = strProcessedWhere & strAnd & strProcessedDate
If strIdentifier = "1" Then
strReportName = "Processed without DepositNEW"
Me.txtWhere = strProcessed
DoCmd.OpenReport "Processed without DepositNEW", acViewPreview, ,
strProcessed
End If
==But when I try to put the the [cmbGroupName] as the record source in
the
report itself, then it gives me the actuall word "all" for each of the
company names.
===============
Duane Hookom said:
How is the combo box used to filter the records in the
reports/subreports?
Is it used directly in the record source or do you use it as the Where
clause in the DoCmd.OpenReport method. I believe it will only work in
the
record source, not in the where clause.
--
Duane Hookom
MS Access MVP
--
Let me try again.. I have a form that uses a combo box (which is
based on
a
union query so I can have the 'all' option show). The report prints
records
based on the selection in the combo box. (the report lists and
groups
all
accounts that are 30, 60, 90, 120 days old) And the combo box tells
the
report which manufacturer to pull this data for. With the 'all'
option I
can
pull the data from 'all' the companies, or I can select a specific
company
and pull the data..This works fine if I use one report. But I really
need
to
be using 2 reports that print as one , i.e. subreports. The 120 days
aged
data needs to be in a separate report that does not group the same
way the
30,60,90 days group. When I put the 2 reports into a main report, as
2
subreports, than the reports do not seem to be responding to the
selection
I
made in the combo box. They just give me 'all' the companies.
Thank you,,
:
This doesn't make much sense to me "report that carries 2 reports it
does
not transfer the selection that was made in the combo box". What is
a
report
that carries 2 reports? Is this a report with two subreports?
How is the combo box used? Does it filter the records in the
report(s)
record sources?
--
Duane Hookom
MS Access MVP
I have a form that uses a combo box with union query behind it to
allow
for
the "all" option in choosing what report to load. The whole thing
works
fine
when I use only 1 report, but when I have the form and its combo
box
selection go to a report that carries 2 reports it does not
transfer
the
selection that was made in the combo box. Both forms use the same
answer
from the box as far as what criteria of data to pull. Have tried
so
many
different ways. but it will still not work with the subreports.