组合框中的名称 [英] Names in a Combo Box

查看:54
本文介绍了组合框中的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试开发一个我商店客户的小数据库。我创建了一个组合框,可以将新客户端添加到列表中。但是,我不知道如何将一个人的名字与我正在使用的形式的姓氏联系起来。

我使用名为Clients的表作为行源,其中包括字段:名字和姓氏。

在表单中,我希望程序自动列出与列表中选择的姓氏一起使用的名字。我知道它应该很简单,但我需要一些帮助。


提前致谢。

Hi guys,
I''m trying to develop a little database of my store''s clients. I made a combo box in which new clients can be added to the list. However, I don''t know how to link a person''s first name to it''s last name in the form I''m using.
I used a table called Clients as the Row Source which includes the fields:First Name and Last Name.
In the form I want the programme to automatically list the First Name that goes with the Last Name that I choose from the list. I know it should be simple but I need some help.

Thanks in advance.

推荐答案

您可以在更新后使用DLookup功能:
You could use a DLookup Function on After update:

展开 | 选择 | Wrap | 行号


在行源的查询网格中,将以下别名字段添加到行源:

FullName:[LastName]& '',' &安培; [FirstName]


为了在组合框中显示FullName,您必须将其拖动并将其定位为绑定列之后的下一列。绑定列是第一列(隐藏列,宽度设置为0)。
In the query grid of your row source, add the following alias field to your row source:
FullName:[LastName] & '', " & [FirstName]

In order to display the FullName in your combobox, you will have to drag and position it as the next column after the bound column. the bound column is the first column (hidden column with width set to 0).


Hi Mitch,

感谢您的帮助,但我必须告诉您我没有代码语言的经验。而不是NameOfBox我因此把组合框的名称。但这似乎并不合适。你能告诉我输入什么而不是:我!NameofBox和我!NameofBox.ControlSource?


谢谢!

Hi Mitch,
Thanks for your help, however I must tell you that I have no experience in code language. In stead of NameOfBox I consequently put the name of the Combo Box. That doesn′t seem to be right though. Could you tell me what to type instead of: Me!NameofBox and Me!NameofBox.ControlSource?

Thanks!


您可以在更新后使用DLookup功能:

You could use a DLookup Function on After update:

展开 | 选择 | Wrap | 行号


这篇关于组合框中的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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