子窗体显示记录#1(非当前客户)的数据 - 帮助!! [英] Subform Displays Data from Record #1 (not current customer) - HELP!!

查看:103
本文介绍了子窗体显示记录#1(非当前客户)的数据 - 帮助!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 -

我正在开发一个简单的应用程序,并且发现了一个问题,我无法修复

经过4个小时的尝试。


我显示一个客户列表,用户选择一个并显示

订单。


frmOrders显示正确地,使用子表单 -

frmOrders_sfrmCustInfo - 在顶部是正确的。子表格显示

cust info - 姓名,地址,电话。名称来自一个函数,它带有

的CustID并获取要显示的名称。 CustID字段是隐藏的,

还使用一个函数从初始表单中取出CustID。


问题:当我选择新订单时并打开新订单表格,

frmOrders_sfrmCustInfo显示地址,来自记录#1的电话

tblCustomers,而不是我正在使用的客户。


我试图创建一个新的frmOrders_sfrmCustInfo并将其称为

frmNewOrder_sfrmCustInfo,但这不起作用。我想我可以

重用相同的子表单,但我猜不是。


我的链接是CustID和CustID,两个字段都存在。我已经尝试将

字段名称txtCustID作为链接而且不起作用。


我的子表单基于tblCustomers。没有选择或查询。


我想我可以在第一个列表框中隐藏所有这些数据字段,并且

从子表单中引用它,但我觉得这不是最简单的

路线。似乎子窗体应该始终工作 - 不明白

为什么它在某些地方而不是在其他地方。


非常感谢 - 我可以发布其他细节;因为没有代码,所以不确定需要什么才能解决这个问题。我现在迷路了;只是

不知道在哪里转!


Sara

Hi -
I am developing a simple app, and just found a problem that I can''t fix
after 4 hours of trying.

I display a list of customers, and the user chooses one and displays
"orders".

The frmOrders displays correctly, with the subform -
frmOrders_sfrmCustInfo - on top that is correct. The subform displays
cust info - name, address, phone. Name is from a function that takes
the CustID and gets the name to display. The CustID field is hidden,
also uses a function to take the CustID off the initial form.

The Problem: When I choose "New Order" and open the "New Order" form,
the frmOrders_sfrmCustInfo shows address, phone from record #1 on
tblCustomers, NOT the customer I am working with.

I tried to create a new frmOrders_sfrmCustInfo and call it
frmNewOrder_sfrmCustInfo, but that didn''t work. I thought I could
reuse the same subform, but I guess not.

My links are CustID and CustID, both fields exist. I have tried the
field name txtCustID as link and that doesn''t work.

My subforms are based on tblCustomers. No selection or query.

I suppose I could hide all these data fields in the first List box and
refer to it from the subform, but I feel like that is not the simplest
route. Seems like the subform should Always work - don''t understand
why it does in some places and not in others.

Thanks so much - I can post other details; not sure what is needed to
figure this out since there''s no code. I''m so lost right now; just
don''t know where to turn!

Sara

推荐答案

我不知道你是如何做你的子表单的,但是当你点击工具箱中的子表单向导时,将子表单变成现有的表单,向导

询问您要连接的字段。很容易,因为即使我管理了

这样做......否则我误解了你的问题...


-e-


" sara" < SA ******* @ yahoo.com> kirjoitti

viestiss?:11 ******************** @ g43g2000cwa.googl egroups.com ...
I don''t know how You did your subform, but in making a subform into an
existing form when you click the subform wizard in the toolbox, the wizard
asks what fields do you want to connect. very easy, because even I managed
to do it... or else I misunderstood Your question...

-e-

"sara" <sa*******@yahoo.com> kirjoitti
viestiss?:11********************@g43g2000cwa.googl egroups.com...
嗨 -
我正在开发一个简单的应用程序,在发现4个小时之后发现了一个我无法解决的问题。

我显示了一个客户列表,并且用户选择一个并显示
订单。

frmOrders正确显示,子表单 -
frmOrders_sfrmCustInfo - 在顶部是正确的。子窗体显示
cust info - 姓名,地址,电话。名称来自一个使用了CustID并获取要显示的名称的函数。 CustID字段是隐藏的,
还使用一个函数将CustID从初始表单中删除。

问题:当我选择新订单时并打开新订单表格,
frmOrders_sfrmCustInfo显示地址,来自记录#1的电话,而不是我正在使用的客户。

我试图创建一个新的frmOrders_sfrmCustInfo并将其称为
frmNewOrder_sfrmCustInfo,但那不起作用。我想我可以重复使用相同的子表单,但我猜不是。

我的链接是CustID和CustID,两个字段都存在。我已经尝试将
字段名称txtCustID作为链接而且不起作用。

我的子表单基于tblCustomers。没有选择或查询。

我想我可以在第一个列表框中隐藏所有这些数据字段,并从子表单中引用它,但我觉得这不是最简单的
路线。似乎子窗体应该始终工作 - 不明白
为什么它在某些地方而不是在其他地方。

非常感谢 - 我可以发布其他细节;因为没有代码,所以不确定需要什么来解决这个问题。我现在迷路了;只是
不知道在哪里转!

Sara
Hi -
I am developing a simple app, and just found a problem that I can''t fix
after 4 hours of trying.

I display a list of customers, and the user chooses one and displays
"orders".

The frmOrders displays correctly, with the subform -
frmOrders_sfrmCustInfo - on top that is correct. The subform displays
cust info - name, address, phone. Name is from a function that takes
the CustID and gets the name to display. The CustID field is hidden,
also uses a function to take the CustID off the initial form.

The Problem: When I choose "New Order" and open the "New Order" form,
the frmOrders_sfrmCustInfo shows address, phone from record #1 on
tblCustomers, NOT the customer I am working with.

I tried to create a new frmOrders_sfrmCustInfo and call it
frmNewOrder_sfrmCustInfo, but that didn''t work. I thought I could
reuse the same subform, but I guess not.

My links are CustID and CustID, both fields exist. I have tried the
field name txtCustID as link and that doesn''t work.

My subforms are based on tblCustomers. No selection or query.

I suppose I could hide all these data fields in the first List box and
refer to it from the subform, but I feel like that is not the simplest
route. Seems like the subform should Always work - don''t understand
why it does in some places and not in others.

Thanks so much - I can post other details; not sure what is needed to
figure this out since there''s no code. I''m so lost right now; just
don''t know where to turn!

Sara



我做到了,连接的字段是主表单上的CustID

和子表单。但是我仍然没有得到关于子表格和主表格的同一客户

的信息。主要表格有客户

我想要的;子表单有第一个客户存档。


帮助!!


谢谢

I did that and the fields connected are CustID on both the main form
and the subform. But still I''m not getting the same customer
information on the sub and main forms. THe main form has the customer
I want; the subform has the first customer on file.

Help!!

Thanks


表之间是否存在关系?

-elli-

" sara" < SA ******* @ yahoo.com> kirjoitti

viestiss?:11 ********************** @ g43g2000cwa.goo glegroups.com ...
Is there a relationship between the tables?
-elli-

"sara" <sa*******@yahoo.com> kirjoitti
viestiss?:11**********************@g43g2000cwa.goo glegroups.com...
我这样做了,并且连接的字段在主窗体
和子窗体上都是CustID。但是我仍然没有得到关于子表格和主表格的相同客户信息。主要形式有我想要的顾客;子表单中有第一个客户存档。

帮助!!

谢谢
I did that and the fields connected are CustID on both the main form
and the subform. But still I''m not getting the same customer
information on the sub and main forms. THe main form has the customer
I want; the subform has the first customer on file.

Help!!

Thanks



这篇关于子窗体显示记录#1(非当前客户)的数据 - 帮助!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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