将Word表单内容控件中的数据导入Access [英] Importing data from Word form content control into Access
本文介绍了将Word表单内容控件中的数据导入Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从Word表单中获取用户输入并将其放入Access DB。我将文档和数据库放在我的C盘上的同一文件夹中。我收到错误:
rst.Fields(" FullName")= doc.FormFields(" txtYourName")。结果
它没有从内容控件获取数据。
以下是所有代码:
I am trying to take the user input from a Word form and place it into an Access DB. I have the document and database in the same folder on my C drive. I am getting an error at :
rst.Fields("FullName") = doc.FormFields("txtYourName").Result
It is not getting the data from the content control.
Here is all of the of the code:
展开 | 选择 | Wrap | 行号
推荐答案
我们无法为您做基本的故障排除;但是,
如果您将执行以下操作,它将帮助我们帮助您:
作为包含以下内容的行:
We can not do the basic trouble shooting for you; however,
if you will do the following, it will help us to help you:
As the line containing:
展开 | 选择 | Wrap | 行号
当我到达该行时:
rst.Fields(" FullName")= doc.FormFields(" txtYourName")。结果
它将我发送给错误处理:
案例-21447022986,429节。我一直滚动并得到错误5941:收集的请求成员不存在。
感谢您的回复
When I get to the line:
rst.Fields("FullName")=doc.FormFields("txtYourName ").Result
it sends me to the error handling:
Case -21447022986, 429 section. I kept scrolling through and got error 5941: The requested member of the collection does not exist.
Thank you for your response
您没有评论出第12行
在该行的条目前放置一个单引号('')。
然后再次运行
You did not comment out Line12
Place a single quote ( '' ) before the entry in that line.
Then run again
我一直滚动并得到错误5941:所请求的集合成员不存在
I kept scrolling through and got error 5941: The requested member of the collection does not exist
这导致我错误命名的控件或字段。
哪条线错误?
This leads me to a mis-named control or field.
Which line errored with that?
这篇关于将Word表单内容控件中的数据导入Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文