I had problems with ServerFilter getting stuck....read about that a bit, so then I abandoned that and tried setting it through code, which worked but briefly showed the old record before it refreshed, which bothered me.
so then I tried an SP (using other examples I found here) and it was nothing but problems, and I can't see putting 57 lines of code in to open to a single record...!!
I found a better way to bind a filtered record source to a form -- SQL string in the OnOpen event for RecordSource using a Global as a parameter...it appears to work well.
-- global 'Cust' having been set from the prior form that opened this form
only thing then is I have to set all the subforms' Child & Master links to nothing, setting them through code instead.
Seems they look to establish the links prior to the OnOpen event, causing a parameter prompt.
Did you try creating the sub form first with the query and then run it once so that there are some fields to bind with. Then, run the main form 1 time and then drop the sub form into the main form. At this point try looking for the link fields.
I've never tried it with a form, but I have with reports. I imagine it works the same way.
In the properties dialog for the report I put the name of the stored procedure as the record source (don't put "dbo." first - just the name of the SP).
Then on the "input parameters" I put the following:
@MonthCleared = [Forms]![frmMonth]![txtMonth]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.