Filtering Subform PLEASE HELP!

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

Guest

Using MS Office 2003:

I have form (Data Entry) with a subform (Patient Visit Data) and would like
to filter the subform with a control where a single field (Appt Date) is
Null. I have a filter to do this in a query and called by a macro assigned to
the control. It works perfect when testing the subform alone but when I open
the main form it doesn't want to play...
 
As you are telling us the filter is applied to the subform, however the
subform is a child of the main form and you should change the macro to 'read'
it first from the main form and then the subform.

Could look something like

forms!Mainform!subformname -> where mainform is the name of the mainform and
the subform is the name of your subform name.

Maurice
 
Maurice, This is not coded, the macro I am using simply uses the "Apply
Filter" option and points to my query filter. The macro is then called by a
button control "On the subform"... Which like I said works fine if I only
open my subform from the database window. When I open the main form with this
subform in it and attempt to filter it, I get the note to "Enter Parameter
Value" for the 2 field names I'm using in my query filter. If I simply answer
ok to each of these 2 prompts it filters fine. I just don't understand why
I'm getting these prompts... something to do with the parameters in the query
perhaps. At any rate, very simple, no visual basic code being used... Thanks!
 
In the end, I changed the control source on my subform to a query where I
could perform the filter action and it worked fine.
 
Back
Top