Ms access 使用查找表帮助组合框-MS Access
基本上,我有一个Ms access 使用查找表帮助组合框-MS Access,ms-access,combobox,lookup-tables,Ms Access,Combobox,Lookup Tables,基本上,我有一个Customer表,其中包含关于我们客户的信息。此表中的一个字段是Customer.CustomerTypeID 我还有一个CustomerType表,它基本上是一个查找表。 我希望CustomerType.CustomerTypeName字段填充我的组合框,然后当我要保存记录时,我希望CustomerType.CustomerTypeID用于CustomerType.CustomerTypeName我选择在Customer.CustomerTypeID字段中更新 我是不是太复杂
Customer
表,其中包含关于我们客户的信息。此表中的一个字段是Customer.CustomerTypeID
我还有一个
CustomerType
表,它基本上是一个查找表。我希望
CustomerType.CustomerTypeName
字段填充我的组合框,然后当我要保存记录时,我希望CustomerType.CustomerTypeID
用于CustomerType.CustomerTypeName
我选择在Customer.CustomerTypeID
字段中更新
我是不是太复杂了?我是否应该更改它,以便将CustomerName
存储在Customer
表中,而不是存储ID
提前谢谢。不,请保存ID
将您的组合设置为:
Row Source: SELECT CustomerTypeID, CustomerTypeName FROM CustomerType
Control Source : CustomerTypeID
Bound Column : 1
Column Count : 2
Column widthes : 0, 2
“控制源+绑定”列表示数据将存储到表单所基于的表中名为CustomerTypeID的字段中,列宽表示ID列被隐藏并显示说明。否,存储ID
将您的组合设置为:
Row Source: SELECT CustomerTypeID, CustomerTypeName FROM CustomerType
Control Source : CustomerTypeID
Bound Column : 1
Column Count : 2
Column widthes : 0, 2
控制源+绑定列表示数据将存储到表单所基于的表中名为CustomerTypeID的字段中,列宽表示ID列被隐藏并显示描述