Filter By Selection

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

Guest

Hello,

I have a Continuous Form with a record source as a query, "qMainContinuous".
The idea behind the form is to constantly filter by selection until all the
desired records are selected and then a report can be printed when the last
field(s) have been selected.

The user first select one field, then clicks filter by selection button.
Then another field of choice, if needed is selected, then the user clicks
filter by selection button.
Etc.

My problem is how do I get the selected data into a table where the report
can be printed? Upon completion of my filter by selection, I tried to run a
make table on the underlying query but gave me what I originally started out
with.

Thanks For Your Help,

Kenny G
 
You might be able to use the Fitler property of the form in your where
clause that opens the report.
 
Duane,

Thanks for your response. I don't understand what you mean. Whenever I
query using the select button the filter property has something like the
following in it.

((qMainContinuous.ReportingOfficer="King, S 116"))

and each time the query is run there would be something different in the
filter property based on which field is selected.

Kenny G
 
I was hoping you could use code like:
Dim strWhere as String
strWhere = Me.Filter
DoCmd.OpenReport "rptYourReport",acPreview, , strWhere
This may not work since the "qMainContinous" is included. It definitely
would work if you had code to remove the table/query name.

I suppose a function could be written that would find the "=" and step
backward to find ".". The function would then delete the characters back to
the "(".
 
Duane,

Many thanks for your help. When I got finished reading your response it
struck me that I had seen something in one of my Pinnacle (Smart Access)
publications a few years back. I went through the whole lot and I found it.

Thanks,

Kenny G
 
Back
Top