简体   繁体   English

MS Access-If语句与组合框和文本框

[英]MS Access - If Statement with combo box and textbox

I have a combo list box that has 4 values (a,b,c,d). 我有一个具有4个值(a,b,c,d)的组合列表框。 I have a textbox also. 我也有一个文本框。 I want the textbox to update based on the value selected from the combobox. 我希望文本框基于从组合框中选择的值进行更新。 For example, the textbox has a default value of text. 例如,文本框的默认值为text。 I want to put an if statement somewhere that says if combobox value = b then make the text in the textbox "Yes" else make it "No". 我想将if语句放在组合框值= b的地方,然后使文本框中的文本为“是”,否则使其为“否”。 I don't know what the if statement should be or where it should go. 我不知道if语句应该是什么或应该去哪里。 I'd like to do this without coding. 我想这样做而无需编码。

用作文本框的ControlSource:

=IIf([NameOfYourCombobox]="b","Yes","No")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM