Controlling Subforms

deville75

Registered User.
Local time
Today, 11:32
Joined
Jan 8, 2007
Messages
24
I have a form with two subforms. These two subforms are bound to a different table each. How can I ApplyFilter on these subforms?
 
You can't to make ApplyFilter on subform, only on Main form.
If you wont to do it on subform, open subform as stand alone.
 
MStef said:
You can't to make ApplyFilter on subform, only on Main form.
If you wont to do it on subform, open subform as stand alone.

Open the subform as a stand alone? How do you do this? Do you mean open it as a form on it's own? But I want it to open as a subform.
 
I don't know that the filter isn't available for a subform, but if MStef says it isn't available, then I tend to believe them. I do know that you can set the recordsource of the subform to whatever you want, so you may need to do something like this:
Code:
Dim strSQL as String
strSQL = "SELECT * FROM YourTableNameHere WHERE YourFieldNameHere=" & Forms!YourMainFormNameHere.ControlNameHere

Forms!YourMainFormNameHere.Form.YourSubFormContainerNameHere.Recordsource = strSQL
Forms!YourMainFormNameHere.Form.YourSubFormContainerNameHere.Requery
 
MStef - I so wanted to do a "come-back" with
"No, you try it" but I figured that you might not get the obscure cultural reference to a U.S. 1970's TV commercial for Life cereal. :D

I believe you. I got used to doing it the way I showed so I rarely use filters (strange, huh?)
 

Users who are viewing this thread

Back
Top Bottom