MS Access 2003/2007 - 子表单上的图表对象,在加载父表单时不加载
所以我有一个子表单,上面只有一个图表对象。它很小,这是这个子的唯一目的。然后我有大约 10 个表单,每个表单都有一个子窗口,该表单作为它的子窗口。我使用 UNION 查询在每个表单上显示 10 个帐户的当前余额,并使用此图表进行比较。除了一件小事情之外,一切都工作正常......
当您打开任何这些表单时,您必须将鼠标移至实际的子窗口并在其中单击以显示图表。一旦你这样做了,它在任何和所有表单上都可以正常工作,但是如果在所有这些表单上也重复出现同样的问题,所以我确信我在这里遗漏了一些东西?
关于这个有什么想法吗?
谢谢 贾斯汀
SO I have a subform, that simply has one chart object on it. Its small, and this is the only purpose of this sub. Then I have about 10 forms that each have a sub windows with this form as it's child. I use a UNION query to show the current balance of 10 accounts on each form with this chart for comparative purposes. Everything works fine except for one small thing...
when you open any of these forms, you have to take your mouse over to the actual sub window and click inside of it to get the chart to show. once you do it works fine, on any and all forms, but this same issue if recurring on all these forms as well, so I am sure I am missing something here??
Any ideas about this one?
thanks
Justin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您可以通过使用子表单而不是直接插入表单中的图表控件来解决此问题。我知道在每种表单中设计图表控件可能会很麻烦,但是通过这样做,您可以独立于任何其他表单直接控制图表的数据源。
示例:
我假设您需要在更新文本框 (txtExample) 后更新图表。
您可以使用
afterUpdate
事件更改控件的数据源:每次更新文本框的值时,图表对象的
RowSource
属性都会更改和更新。希望这对你有用
I think you can work this out by not using a subform, but rather a chart control directly inserted in the form. I know it can be a headache to design a chart control in every form, but by doing it, you can control directly the data source of the chart independently from any other form.
Example:
I will suppose that you need to update the chart after updating a text box (txtExample).
You can alter the data source of the control usint the
afterUpdate
event:The
RowSource
property of the chart object will be altered and updated every time the value of the text box is updated.Hope this works for you
我四处寻找这个问题,发现
me.graph1.requery
在我的 2003 版本中没有帮助。我确实在绝望中尝试了这个:docmd.requery (Graph1)
崩溃了,但是当你将on errorresume next
时,它每次都会显示图表!真正的微软风格我想用另一个有缺陷的东西来修复它。I have looked around for this problem and found that
me.graph1.requery
doesn't help in my 2003 version. I did try in desperation this:docmd.requery (Graph1)
that crashes but when you puton error resume next
it does show the graph everytime! True Microsoft style I guess to fix it with another buggy thing.