PDA

View Full Version : Applying a filter to a subform on load.



OdiN
07-20-2007, 10:49 AM
Okay I have a sub-form inside another form which I want to apply a filter to, but I'm not sure how to apply it in VBA.

I have a table with log entries to track problems/issues with stuff, and there is one form where I only want it to show the entries in the log which have a certain ticket # entered. So the filter for that field is "= is not null".

I just need some help getting that to work in VBA.

Thanks in advance!

OBP
07-22-2007, 06:17 AM
It would be helpful if you could post a zipped copy as an attachment.
There are 2 ways to achieve your filter, one is using VBA to set it for the form and the other is to simply set a Criteria in the Query that you should be using to supply the data to the form.

DarkSprout
10-25-2007, 05:33 AM
Answer:

With Me.objectname
.RowSource = "qry_QueryName"
'. <Play with the dots>
.Requery
End With