访问:下拉列表不显示连续子表单的第一条记录中的值
我有一个 Access 2003 表单中的连续子表单。子窗体上的第一个控件是一个未绑定的下拉框。当表单(和子表单)打开时,第一个记录上的下拉列表接收焦点,但文本为空白(只是闪烁的光标)。如果我单击任何其他记录,第一个记录的下拉文本将显示正确的值(并且我单击的记录不会变为空白)。
尝试了以下行
Call DoCmd.GoToRecord(acDataForm, "DetailsSubform", acNewRec)
,
我在主窗体和子窗体的加载、打开和激活事件中 但没有成功。要么我收到子表单未打开的错误,要么与填充下拉列表的例程存在冲突。
我正在寻找一种方法,让下拉列表显示其值,或者只是跳转到新记录(我的客户更喜欢后者,但可以接受前者)。如果需要,可以提供更多信息,我只想从概述开始。谢谢。
I have a continuous subform in an Access 2003 form. The first control on the subform is an unbound dropdown box. When the form (and subform) are opened the dropdown on the first record receives focus, but the text is blank (just a blinking cursor). If I click on any other record, the first record's dropdown text then display the correct value (and the record I clicked on does not go blank).
I tried the following line
Call DoCmd.GoToRecord(acDataForm, "DetailsSubform", acNewRec)
in the both the main form's and subform's Load, Open and Activate events with no luck. Either I get an error that the subform isn't open, or there's a conflict with the routine that populates the dropdown.
I'm looking for a way for either the dropdown to display its value, or simply jump to a new record (my client would prefer the latter but can live with the former). More information can be provided if needed, I just wanted to start with an overview. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要当前事件。请注意,连续子窗体中的未绑定控件将为所有记录显示相同的值。
You probably need the current event. Note that an unbound control in a continuous subform will display the same value for all records.