访问RecordSet字段()需要初始化吗?
我使用OnClick事件从组合框中获取值。如这里: me.com.boselproject.recordset.fields(0).value 在第一个OnClick事件中,无论选择了哪一行,该值都是从记录集的第一行。在随后的OnClick事件中,值是针对选定的行。 Combobox面对的值始终是正确的选择值。 iow comboselproject.text始终是正确的。 我尝试使用: me.com.boselclient.value = me.com.boselclient.itemdata(0),但这没有帮助。 感谢您的帮助...
I use the onClick event to get values from a combo box. As here:
Me.ComboSelProject.Recordset.Fields(0).Value
On the first onClick event, no matter what row has been selected, the value is from the first row of the recordset. On subsequent onClick events the value is for the selected row.
The value shown in the face of the combobox is always the correct selected value. IOW comboSelProject.text is always correct.
I've tried to initialize the combobox in the Form_load() procedure using:
Me.ComboSelClient.Value = Me.ComboSelClient.ItemData(0) but this has not helped.
Thanks for any help ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
点击事件发生在更改事件之前。如果要使用新值,请使用更改事件。
而且您可能应该尝试初始化组合框的.TEXT,而不是.value
The click event happens before the change event. If you want to use the new value, use the Change event.
And you should probably try to initialize the .text of the combo box rather than the .value