开发者

subform display not updating (but its record count can be seen to be changing in vba)

I've tried more than half-a-dozen distinct configurations, without success. The first, and simplest, way that I tried:

Main form with two unbound sub-forms; left-hand sub-form is for selecting a "category"; right-hand sub-form is intended to list all "items" within the selected category for the current record of the main form. In the "current" handler of the category sub-form, I set the recordsource of the "items" sub-form to a string of dynamic SQL that basically says

"SELECT x, y, z, FROM tblItems WHERE itemCategory = " & selectedCategory & " AND itemOwner = " & parentRecordId

The "items" sub-form should display the selected x, y, z values in a continuous datasheet.

Stepping through with debugger, I can see that the record count of the "items" sub-form changes to the expected numbers as I select different cate开发者_如何学编程gories, but the displayed results never change (in many of the ways I've tried, the entire tblItems is displayed).

I have lots of details I can provide on this and the many variations I've tried, but thinking best(?) to keep this initial post short.


I take it that you have forced a refresh of the data source using a form.refresh or form.recalc method?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜