如何创建允许用户在对话框中选择文件夹的提示? [英] How can I create a prompt that allows a user to select a folder in a dialog?

查看:59
本文介绍了如何创建允许用户在对话框中选择文件夹的提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有另外一个单调乏味的请求,我自己无法弄明白,但希望你们能回答。


在用户与之交互的表单之一上有一个字段(链接到表格),该字段被格式化为超链接,允许用户粘贴共享驱动器上该特定记录的文件夹的位置。 (为了节省点击共享驱动器上的各种文件夹以便每次需要访问时找到特定文件夹的麻烦)


如果可能的话我想要一个按钮启动基本Windows选择文件夹对话框。用户使用对话框选择文件夹后,该位置将显示在分片文件夹字段中并存储在那里以备将来使用。


我不确定这是否可行但是我可以想象它是。


感谢他的帮助,非常感谢!

解决方案

  1. 首先,设置对Microsoft Office XX.X对象库的引用。
  2. Copy-N-Paste将以下代码粘贴到适当的位置:

    展开 | 选择 | Wrap | 行号

    感谢您的回复 - 但是我没有按照您的第一条指示行事。对不起,如果它应该是直截了当的,我是Access的业余...


    如果涉及的两个对象是文本字段和按钮,我会在哪里发布代码?


    再次感谢,我真的很感激!


    1. 在任何代码视图窗口中,单击工具,引用。向下滚动到Microsoft Office XX.X对象库,选择复选框,然后单击确定。
    2. 此代码通常会出现在命令按钮的Click()事件中。


    Hello all,

    I have another tedious request that I cannot figure out on my own but hopefully you guys can answer.

    On one of the forms the user interacts with there is a field (linked to a table) that is formatted as a hyperlink that allows the user to paste in the location of that specific record''s folder on the shared drive. (to save the hassle of clicking through the various folders on the shared drive to find a specific one every time it needs to be accessed)

    If possible I would like to have a button that launches the basic Windows "Select a Folder" dialog box. After the user selects a folder using the dialog box, the location appears in the shard folder field and stored there for future use.

    I''m not sure if this is possible but I would imagine it is.

    Thanks for he help, it is greatly appreciated!

    解决方案

    1. First, set a Reference to the Microsoft Office XX.X Object Library.
    2. Copy-N-Paste the following Code to wherever appropriate:

      Expand|Select|Wrap|Line Numbers


    Thank you for the reply - however I do not follow your first instruction. Sorry if it should be something straightforward, I''m an amateur at Access...

    Also if the two object involved are a text field and a button, where would I post the code?

    Thanks again, I really appreciate it!


    1. In any Code View Window, click on Tools, References. Scroll down to the Microsoft Office XX.X Object Library, select the Check Box, then OK.
    2. This Code would typically go in the Click() Event of a Command Button.


    这篇关于如何创建允许用户在对话框中选择文件夹的提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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