Dlookup 依赖于标签/文本框
我试图弄清楚如何使我的 Dlookup 函数看起来像其关联的标签和该标签的值。
我的例子是:
=DLookup("[OfficeOf]","tblLocationMSTR","[LocationCode]=LABEL CONTENT HERE")
最重要的是,我需要添加一个 Mid() 命令,如下所示:
=DLookup("[OfficeOf]","tblLocationMSTR","[LocationCode]=Mid("LABEL CONTENT HERE")")
I am trying to figure out how I can make my Dlookup function to look as its associated label and the value of that label.
My example is:
=DLookup("[OfficeOf]","tblLocationMSTR","[LocationCode]=LABEL CONTENT HERE")
And on top of that, I need to add a Mid() command for something like this:
=DLookup("[OfficeOf]","tblLocationMSTR","[LocationCode]=Mid("LABEL CONTENT HERE")")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果附加了标签,您的文本框将有一组控件。
您必须确定表单上文本框的名称。我使用 TextBox1 作为示例。
Your textbox will have a set of controls if the label is attached.
You will have to determine the name of the textbox on your form. I used TextBox1 as an example.
将表单的 OnLoad 属性设置为
[Event procedure]
,然后在表单后面添加以下代码:我假设您需要一种方法来指定应动态更新哪些标签/文本框组合。您可以通过将每个文本框的 Tag 属性设置为某些特定文本来实现此目的,您可以在循环遍历控件时检查这些文本。
Set the form's OnLoad property to
[Event Procedure]
then add the following code behind the form:I assumed that you'll want a way to specify which label/textbox combos should be dynamically updated. You can do that by setting the Tag property of each textbox to some specific text that you can check when looping through the controls.