本文介绍了使用两个短文本字段作为主键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是小企业主,正在尝试为我们的客户信息构建MSAccess数据库。  它将有多个表和不同的来源,但所有信息都与客户的LastName和FirstName相关。  令我惊讶的是,我无法将
指定为两个不同的字段作为设计视图中的主键。  每个字段都包含重复项;但是,两个字段一起唯一地标识行/记录。  有人可以告诉我我做错了什么吗?  谢谢!

I am a small business owner and am attempting to build an MSAccess DB for our customer info.  It will have multiple tables and different sources but all the info relates to a customer's LastName and FirstName.  Much to my surprise, I am unable to designate the two different fields as Primary Keys in Design View.  Each field contains duplicates; however, the two field together uniquely identify a row/record.  Can someone tell me what I am doing wrong?  Thanks!

推荐答案

虽然你想要做的是可能的,但它会更简单的是,我认为使用单个数字字段作为主键。

Although what you're trying to do is possible, it would be simpler, in my humble opinion, to use a single numeric field as a primary key.

但是,如果您坚持使用这两个字段,请转到索引窗口并选择第二个字段第一个字段下面没有指定索引名称的字段。

However, if you insist in using the two fields, go to the Index window and select the second field just below the first one without specifying an index name.

希望它有帮助......

Hope it helps...


这篇关于使用两个短文本字段作为主键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 22:18