Filtering With Macro

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

Guest

I’m trying to create a report that filters my records thru a query. I
created the query. It shows all the records, I then created a form to ask 3
questions, who the report is for, the start and the stop dates. I told the
print button to run the macro . To see if I’m on the correct path I just
used who the report is for. The name of the field in the query is “Name†and
the txtbox’s name is “txtFilterName and the name of the form is
“frmTimeRe-port†My code in the applyfilter “Where Condition is
=[forms]![frmTimeReport]![txtfiltername] =“nameâ€. It does not error out but
does not work.

Thank You In Advance
Dumb A.. Wm.
 
Use the Where argument in the OpenReport action to filter the report.

--

Ken Snell
<MS ACCESS MVP>


"open a adobe file from a command button"
 
Thank You very much, that seems to work well!!

Ken Snell (MVP) said:
Use the Where argument in the OpenReport action to filter the report.

--

Ken Snell
<MS ACCESS MVP>


"open a adobe file from a command button"
I'm trying to create a report that filters my records thru a query. I
created the query. It shows all the records, I then created a form to ask
3
questions, who the report is for, the start and the stop dates. I told
the
print button to run the macro . To see if I'm on the correct path I just
used who the report is for. The name of the field in the query is "Name"
and
the txtbox's name is "txtFilterName and the name of the form is
"frmTimeRe-port" My code in the applyfilter "Where Condition is
=[forms]![frmTimeReport]![txtfiltername] ="name". It does not error out
but
does not work.

Thank You In Advance
Dumb A.. Wm.
 
Back
Top