form to subform filter

  • Thread starter Thread starter greenbite via AccessMonster.com
  • Start date Start date
G

greenbite via AccessMonster.com

Hi there

im alittle stuck on filters and was hoping someone can help me out...i have a
form and a subform (continous). the parent form has command buttons whereby
they filter the subform which work great (their basic ones such as filter by
form/filter by selection) what im having a HUGE amount of trouble with is
trying to make specific filters...for instance:

the subform has a txtDate. some records have a date, some dont. I'd like a
filter button to show ALL the txtDate that are not empty when the user clicks
the button...can someone pls get me started? i'd appreciate it soooo much :)
 
Your command button probably builds a filter string. You can filter for dates
that aren't null by using:
strFilter = "[MyDateField] Is Not Null"

I believe you need to apply the filter to the underlying fields, not the
form controls.

Barry
 
be sure to turn the filter off then load the filter and then turn the
filter back on.

Ron
 
thanks for your replies - however im still v.stuck!

i added the piece of code but it didnt seem to work, the system somehow just
bypassed it and the filter didnt work...would u be able to show me a sample
as i have alot of filters i need to make but have no idea how to start them,
i've tried everything. i had a look as allen browne's website but it works
more on combo boxes than text box filters...would u know what to do?
 
After setting the filter on me.controlname.setfilteron = true

you might try a me.controlname.requery

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top