如何找到MS Access数据库的当前路径(目录)? [英] How do I find the current path (directory) of a MS Access database?

查看:137
本文介绍了如何找到MS Access数据库的当前路径(目录)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Access数据库中编写VBA,并且需要引用该数据库的包含目录.由于我将移动数据库,因此该路径可能会更改.

I am writing VBA within my Access database and I need to reference the containing directory of this database. This path could change since I will be moving the database around.

推荐答案

您将要使用以下代码:

CurrentProject.Path

这将返回代表当前目录文件路径的字符串.

This will return a string representing the file path of the current directory.

这篇关于如何找到MS Access数据库的当前路径(目录)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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