Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图让用户双击列表框中的项目,然后将选定的值(以及使用 SQL 的一些相关值)输入到我准备好的表中。
我会发布我拥有的代码,但事实是我什至不知道从哪里开始,所以任何帮助都将不胜感激。
我的列表框 (listResult) 有 3 列我想输入到我的表中(股票转换)。
提前致谢,
鲍勃·P
一种可能:
Dim qdf As QueryDef 'Temporary query Set qdf = CurrentDb.CreateQueryDef( _ "", "Insert Into Table1 (atext,anumber) values ([p1],[p2])") qdf.Parameters("[p1]") = "abc" qdf.Parameters("[p2]") = 20 qdf.Execute dbFailOnError