form to subform filter

  • Thread starter greenbite via AccessMonster.com
  • 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 :)
 
G

Guest

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
 
R

Ron2006

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

Ron
 
G

greenbite via AccessMonster.com

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?
 
R

Ron2006

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

Top