在Access 2003中跨多个表单提取数据 [英] Pulling data across multiple forms in Access 2003

查看:308
本文介绍了在Access 2003中跨多个表单提取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有一个带有标签控件的数据库表单,并且每个标签上都有另一个表单。每个表单从不同的查询中提取数据。


例如,选项卡1可能列出个人信息(form1),选项卡2显示账单信息(form2)。

我有一个相当简单的问题,但我似乎无法弄清楚如何从选项卡2上的表单中提取数据并将其显示在选项卡1上。因此,如果选项卡2上的form2有一个名为balanceDue,我想在form1上分配一个字段来显示该信息。


要检查我是否能从form1上的form2获取数据,我'我试过制作一个非常简单的按钮来做msgbox(form2!balanceDue.value)。但这显然不起作用。


我觉得自己像个菜鸟。有人能帮助我吗? : - )

Hello,

I have a database form that has a tabs control, and on each tab is another form. Each form pulls data from a different query.

For example, tab 1 may list personal information (form1), tab 2 shows billing information (form2).

I have a rather simple problem, but I can''t seem to figure out how to pull data from the form on tab 2 and display it on tab 1. So if the form2 on tab 2 has a field called "balanceDue", I''d like to assign a field on form1 to show that information.

To check that I am able to get the data from form2 on form1, I''ve tried making a very simple button that does "msgbox(form2!balanceDue.value)" but that clearly does not work.

I feel like a noob. Could someone help me? :-)

推荐答案

form1和form2被认为是主窗体的子窗体。

在subform1上创建一个文本框并将值设置为
form1 and form2 are considered subforms of the main form.
Create a textbox on subform1 and set the value to
展开 | 选择 | Wrap | 行号



form1和form2被视为主窗体的子窗体。

在subform1上创建一个文本框并将值设置为
form1 and form2 are considered subforms of the main form.
Create a textbox on subform1 and set the value to
展开 | 选择 | Wrap | 行号



谢谢玛丽,


Yup刚刚在10秒前自己解决了这个问题。大声笑。


我试图推导出正确的对象属性。我的!和。和语法相互绊倒。哈哈。


" msgbox(Forms!mainform.form2!balanceDue.Value)"做了伎俩。我现在可以不再抨击我的头了。 haha
Thanks Mary,

Yup just figured this out myself, about 10 seconds ago. lol.

I was trying to derive the proper object properties. My ! and . and syntax were tripping over each other. haha.

"msgbox(Forms!mainform.form2!balanceDue.Value) " did the trick. I can stop bashing my head into the table now. haha



很高兴你把它排序了。当你能为自己解决这些问题时,总是很好。

Glad you got it sorted. It''s always nice when you can figure these things out for yourself.


这篇关于在Access 2003中跨多个表单提取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆