本文介绍了子窗体显示记录#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

推荐答案






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

09-22 22:02