创建将交叉引用表的文本框控件 [英] Creating a Textbox Control that will Cross Reference a Table

查看:88
本文介绍了创建将交叉引用表的文本框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好;

我有一个包含名为CPUServicetag(序列号)的文本框控件的表单。我的用户手动输入CPUServicetag。我的问题是这个......我如何在一个单独的文本框控件中创建一个表达式,在控件源中将手动输入的CPUServicetag交叉引用一个名为RMA的表,其中包含两个字段:Serial_num(CPUServicetag)和RMA# ,并在此单独的文本框中显示控制与CPUServicetag关联的RMA#,它与Serial_num相同。这是我以前从未处理过的,需要一些帮助

Hi All;
I have a form that contains a textbox control called CPUServicetag (Serial number). My users enter in the CPUServicetag manually. My question is this ... How do I go about creating an expression in a separate textbox control with in the control source that would cross reference the manually entered CPUServicetag to a Table called RMA which contains two fields: Serial_num (CPUServicetag) and RMA# , and display in this separate textbox control the RMA# associated to the CPUServicetag which is the same as Serial_num. This is something I have never dealt with before and need some assistance

推荐答案

您可以使用DLookup()函数。给我一会儿,我会把一些(非特定的)VBA代码放到你的表格中。如果你要回到表格中显示数据的正确名称以及所使用的两个字段的类型,那么我可以更准确地定制它。


NB。 Access不喜欢在控件名中使用''#''字符 - 它将在相关的事件名称中自动转换。
You can use the DLookup() function. Give me a short while and I''ll knock up some (non-specific) VBA code to put in your form. If you were to come back with the correct name of the controls on your form where the data will be shown and the types of the two fields used, then I could tailor it more precisely.

NB. Access doesn''t like using a ''#'' char in a control name - it will be converted automatically in related event names.



大家好

我有一个包含名为CPUServicetag(序列号)的文本框控件的表单。我的用户手动输入CPUServicetag。我的问题是这个......我如何在一个单独的文本框控件中创建一个表达式,在控件源中将手动输入的CPUServicetag交叉引用一个名为RMA的表,其中包含两个字段:Serial_num(CPUServicetag)和RMA# ,并在此单独的文本框中显示控制与CPUServicetag关联的RMA#,它与Serial_num相同。这是我以前从未处理过的事情,需要一些帮助
Hi All;
I have a form that contains a textbox control called CPUServicetag (Serial number). My users enter in the CPUServicetag manually. My question is this ... How do I go about creating an expression in a separate textbox control with in the control source that would cross reference the manually entered CPUServicetag to a Table called RMA which contains two fields: Serial_num (CPUServicetag) and RMA# , and display in this separate textbox control the RMA# associated to the CPUServicetag which is the same as Serial_num. This is something I have never dealt with before and need some assistance



我假设您将[RMA#]字段名称改为[RMA],并且,现在,假设Serial_num字段是字母数字。

I''ve assumed you will change your [RMA#] field name to simply [RMA], and, for now, have assumed that the Serial_num field is alpha-numeric.

展开 | 选择 | Wrap | 行号


谢谢!! ... 谢谢!! ... 谢谢!! ....这解决了我的问题.....我也接受了你的建议并将我的专栏名称从RMA改为RMA
Thank You!! ... Thank You!! ... Thank You!! .... This resolved my issue.....Also I took your advice and changed my column name from RMA# to RMA


这篇关于创建将交叉引用表的文本框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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