MS Access '97 - 如何从表单中显示的列表框中返回数据记录 [英] MS Access '97 - How do i return a record of data from a list box presented in a form

查看:88
本文介绍了MS Access '97 - 如何从表单中显示的列表框中返回数据记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这里的新用户并使用ms access 97数据库。

我有一个表单,其中包含一个列表框,其中显示了表格的内容。


双击记录时,我需要将记录显示在一个新的表单,可以添加更多的数据。


我在Double Click的列表框中设置了事件过程,然后我就可以使用DoCmd.OpenFormfrmDataEntry了。但是如何传递我选择的值(双击),然后填充表格?


许多tks

解决方案

< blockquote> DoCmd systax如下

展开 | 选择 | Wrap | 行号


Don,

tks对于快速回复。我现在收到以下代码的语法错误;


DoCmd.OpenForm" frmDataEntry",,," [frmDataEntry.txtRepairRef] =" &安培; "" &安培; [lstEnquiry]& "''"""


尝试解决我已尝试过没有表单名称的例子;

DoCmd.OpenForm frmDataEntry,,," [txtRepairRef] =" &安培; "" &安培; [lstEnquiry]& "''"""


我也尝试用表名和字段替换表单名称和字段。


我在某个地方出错

感谢任何建议。


@Quizzed


它应该是这样的。

展开 | 选择 | Wrap | 行号


Hi,
New user here and using a ms access 97 database.
I have a form containing a list box which presents the contents of a table.

On double clicking a record, i need the record to be presented in a new form where further data can be added.

I set the event procedure against the list box on Double Click, i can then use the DoCmd.OpenForm "frmDataEntry" but how do i pass the value that ive selected (double clicked), to then populate the form?

Many tks

解决方案

the DoCmd systax is as follows

Expand|Select|Wrap|Line Numbers


Don,
tks for the quick reply.Im now receiving a syntax error on the following code;

DoCmd.OpenForm "frmDataEntry", , , "[frmDataEntry.txtRepairRef] = " & "''" & [lstEnquiry] & "''"""

To try and resolve I''ve tried it without the the form name eg;
DoCmd.OpenForm "frmDataEntry", , , "[txtRepairRef] = " & "''" & [lstEnquiry] & "''"""

I also tried replacing the form name and field with the table name and field.

Im going wrong somewhere
Appreciate any advice.


@Quizzed
It should be like this.

Expand|Select|Wrap|Line Numbers


这篇关于MS Access '97 - 如何从表单中显示的列表框中返回数据记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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