需要“浏览文件”按键 [英] Need "Browse for File" button
问题描述
我需要一些帮助。我需要Access表单上的一个按钮,允许用户浏览我们网络上的文件,并将其插入字段(而不必键入路径)。我不需要任何过滤器,因为文件可以是任意数量的格式。
我遇到了一些所谓的简单。解决方案,但对于我的生活,我要么无法理解他们,要么我不能让他们工作。我对VB一无所知,所以如果有人能提供一个真正简单的答案(最好是我可以剪切和粘贴的东西),并明确说明如何让它真正起作用,我会非常感激。
>
哦,我在Access 2000中对此进行编码,但如果需要,我可以在Access 2002-2003中编写代码。
谢谢!
Barb
I need some help. I need a button on an Access form that allows the user to browse for a file on our network, and insert it in a field (rather than having to type a path). I dont need any filters because the files can be any number of formats.
I''ve come across a couple of so-called "simple" solutions, but for the life of me, I either cant understand them or I cant get them to work. I know nothing about VB so if someone can provide a truly simple answer (preferably something I could cut and paste) with clear instructions on how to actually get it to work, I''d be VERY grateful.
Oh, I am coding this in Access 2000, but if I need to, I can code it in Access 2002-2003.
Thanks!
Barb
推荐答案
我需要一些帮助。我需要Access表单上的一个按钮,允许用户浏览我们网络上的文件,并将其插入字段(而不必键入路径)。我不需要任何过滤器,因为文件可以是任意数量的格式。
我遇到了一些所谓的简单。解决方案,但对于我的生活,我要么无法理解他们,要么我不能让他们工作。我对VB一无所知,所以如果有人能提供一个真正简单的答案(最好是我可以剪切和粘贴的东西),并明确说明如何让它真正起作用,我会非常感激。
>
哦,我在Access 2000中对此进行编码,但如果需要,我可以在Access 2002-2003中编写代码。
谢谢!
Barb
I need some help. I need a button on an Access form that allows the user to browse for a file on our network, and insert it in a field (rather than having to type a path). I dont need any filters because the files can be any number of formats.
I''ve come across a couple of so-called "simple" solutions, but for the life of me, I either cant understand them or I cant get them to work. I know nothing about VB so if someone can provide a truly simple answer (preferably something I could cut and paste) with clear instructions on how to actually get it to work, I''d be VERY grateful.
Oh, I am coding this in Access 2000, but if I need to, I can code it in Access 2002-2003.
Thanks!
Barb
- 设置对Microsoft Office XX.X对象库的引用。
- 复制和在适当的地方粘贴以下代码,更改文本框的名称
- Set a Reference to Microsoft Office XX.X Object Library.
- Copy and Paste the following code wherever appropriate, changing the name of the Text Box
设置对Microsoft Office XX.X对象的引用图书馆。
Set a Reference to Microsoft Office XX.X Object Library.
我该怎么做?
How do I do that?
在适当的地方复制并粘贴以下代码,
Copy and Paste the following code wherever appropriate,
我很害怕我无法开始知道哪里合适。你能更具体一点吗?
I''m afraid I couldnt begin to know where it''s appropriate. Can you be more specific?
更改文本框的名称
changing the name of the Text Box
Do你的意思是我必须更改实际文本框的名称(我将它更改为什么?)或者你是说我必须在下面的代码中重命名文本框参考?
抱歉,我警告过你我对此一无所知
谢谢!
Barb
Do you mean I have to change the name of the actual Text Box (what do I change it to?) or do you mean I have to rename the Text Box reference in the below code?
Sorry, I warned you I knew nothing about this
Thanks!
Barb
- 设置对Microsoft Office XX.X对象库的引用。
- 在适当的位置复制并粘贴以下代码,更改名称文本框
- Set a Reference to Microsoft Office XX.X Object Library.
- Copy and Paste the following code wherever appropriate, changing the name of the Text Box
我该怎么做?
我恐怕无法开始知道哪里合适。你能更具体一点吗?
你的意思是我必须更改实际文本框的名称(我将其更改为什么?)或你的意思是我必须在下面的代码中重命名文本框参考吗?
对不起,我警告过你我对此一无所知
谢谢!
Barb
How do I do that?
I''m afraid I couldnt begin to know where it''s appropriate. Can you be more specific?
Do you mean I have to change the name of the actual Text Box (what do I change it to?) or do you mean I have to rename the Text Box reference in the below code?
Sorry, I warned you I knew nothing about this
Thanks!
Barb
- 设置对Microsoft Office对象库的引用
- 在表单设计视图中
- 从菜单栏中选择View ==>代码
- 从菜单栏中选择工具==>参考
- 向下滚动到Microsoft Office XX.X对象库
- 选择此选项旁边的复选框
- 单击确定
- 右键单击文本框==>属性==>所有标签==>名称。
- 将文本框重命名为txtSelectedFile
- 关闭属性对话框
这篇关于需要“浏览文件”按键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!