简体   繁体   English

在连续表单视图中修改表单详细信息部分中单个控件的属性

[英]Modify properties for individual controls in the details section of a form in continuous forms view

I have a form with a default view set to continuous forms.我有一个默认视图设置为连续表单的表单。 I want to set the enabled property of a command button control to disabled for records that have a null value in a specific column.对于在特定列中具有空值的记录,我想将命令按钮控件的启用属性设置为禁用。

Short answer, you can't.简短的回答,你不能。 What you need to do is start the button routine with an IF statement that says if the required control is null then exit sub.您需要做的是使用 IF 语句启动按钮例程,该语句表示如果所需控件为空,则退出 sub。 That way the button won't do anything if the field has a null value这样,如果字段具有空值,按钮将不会执行任何操作

Try setting the caption in the Detail_Paint event for the form:尝试在Detail_Paint事件中为表单设置标题:

cb_SetSpecies.Caption = [Species_Name]

This allows a different value to be set for each record.这允许为每个记录设置不同的值。

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

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