Ok guys I have one more question for the collective.
I have a form that contains 4 multi-select listboxes. These listboxes create a query based on the selections by using some VBA I wrote in their AfterUpdate Event.
What I would like to do now is add a subform to my current form that will show the data that the query created by the listboxes pulls. I can create the subform and set it in datasheet view and it shows the data.
The problem comes in when I change a value in the listbox. The query that is set as the RecordSource of the subform changes but the subform itself does not update. I would like this to be a more realtime preview that changes when its underlying query changes. I know the query is changing with each new selection in the listbox but the subform does not reflect this.
Does anyone know how to make it show the current data. I am assuming it is some form of requery or refresh but I can seem to get it right...
I tried to generalize that so hopefully it makes sense.
The thing that caused me a couple of problems was that I was leaving out the .Form after the subFormName. Took me a little searching around the forum before I foudn this but it now works beautifully in the afterUpdate area.
You must have misunderstood my last post. I actually found a solution all on my own . The code supplied is what I used. I posted it here in hopes that other might be able to use this as well when needed.