Filter only Subform

D

David W

This may be easier

how do you filter a subform in VB

I tried this in a subform that is not linked and it didnt work
me.filter = [vendor] = me.combo45
me.filterOn = true

Ideals?
 
M

Marshall Barton

David said:
how do you filter a subform in VB

I tried this in a subform that is not linked and it didnt work
me.filter = [vendor] = me.combo45
me.filterOn = true


The filter property is a string valued property. The string
should contain the filter expression. Assuming that Vendor
is a text field:

me.filter = "[vendor] = """ & me.combo45 & """"

If it's a numeric type field:

me.filter = "[vendor] = " & me.combo45
 

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