组合/现场问题 [英] Combo/Field Problem

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

问题描述




我有一个组合框(命名为:种族)和一个字段(名称:

OtherEthnicity)。当选择其他时,从组合下拉列表中,我希望
在选择时启用它旁边的字段。


我有一个之前构建一些业余编码,但它不起作用。


私有子种族_后更新()

如果其他那么

[OtherEthinicity ] .Enabled = True

Else

[OtherEthinicity] .Enabled = False

结束如果

End Sub < br>

Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity). From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.

Private Sub Ethnicity_AfterUpdate()
If Other Then
[OtherEthinicity].Enabled = True
Else
[OtherEthinicity].Enabled = False
End If
End Sub

推荐答案

为什么不将Combobox的LimitToList属性设置为False,然后输入
然后输入你想要的任何内容?

why not just set the LimitToList property of the Combobox to False and
then enter whatever you want?


表单上有一个组合框和另外一个文本框,我希望

其他文本框在激活时激活在这个

的情况下已经进行了某些选择,它是组合框中的其他内容。将限制列表设置为false确实

其他文本框是什么?什么都没有!


< pi ******** @ hotmail.com>在消息中写道

news:11 ********************** @ f14g2000cwb.googlegr oups.com ...
There is a combo box on the form and another text box besides it, I want the
other text box to be activated when a certain selction has been made in this
case it is Other from the combo box. Setting the limit to list to false does
what to the other text box? Nothing!

<pi********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
为什么不将Combobox的LimitToList属性设置为False然后输入你想要的任何内容?
why not just set the LimitToList property of the Combobox to False and
then enter whatever you want?



Dave写道:
Dave wrote:


我有一个组合框(命名为:种族)和一个字段(名称:
OtherEthnicity)。当选择其他时,从组合下拉列表中,我希望在选择时启用它旁边的字段。

我之前构建了一些业余编码,但它不行。
Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity). From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.




试试这个:


私人子种族_后更新()

如果我.Ethnicity =" Other"然后

Me.OtherEthinicity.Enabled = True

Else

Me.OtherEthinicity.Enabled = False

结束If

End Sub


我个人更喜欢遵循命名约定。我将其命名为

种族为cboEthnicity和OtherEthinicity为txtOtherEthinicity。


在Access网站上阅读本文:
http://www.mvps.org/access/general/gen0012.htm


-

Tim http://www.ucs.mun.ca/~tmarshal/

^ o<

/#)" Burp - 哔哔,打嗝,打嗝? - Quaker Jake

/ ^^Whatcha doin? - 同上TIM-MAY !! - 我



Try this:

Private Sub Ethnicity_AfterUpdate()
If me.Ethnicity = "Other" Then
Me.OtherEthinicity.Enabled = True
Else
Me.OtherEthinicity.Enabled = False
End If
End Sub

I personally prefer to follow a naming convention. I would name
Ethnicity as cboEthnicity and OtherEthinicity as txtOtherEthinicity.

Have a read of this article on the Access web:
http://www.mvps.org/access/general/gen0012.htm

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me


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

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