为MS Access 2007中的记录创建目录 [英] Create Directory for records in MS Access 2007

查看:74
本文介绍了为MS Access 2007中的记录创建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以为Access 2007中的单个记录创建目录文件夹.例如

Is it possible to create a directory folder for individual records in Access 2007. For example

tblUser
ID
firstName
surName

添加记录时,将创建一个文件夹C:\ userdatabase \ Surname,firstName,ID

When adding a record, would create a folder C:\userdatabase\Surname,firstName,ID

例如在需要将大量图像/文件与记录关联的情况下,这可能会很有用. Access将为每个记录创建并链接到目录.

Could see this being useful in situations for example where a large amount of images/files would need to be associated with a record. Access would create and link to a directory for each record.

预先感谢您的任何建议

Noel

推荐答案

您可以使用VBA MkDir 语句创建目录.

You can use the VBA MkDir statement to make a directory.

例如,如果您要创建一个名称与您的ID值之一匹配的文件夹,作为存储数据库的目录下的子文件夹,则可以使用以下代码:

For example if you want to create a folder whose name matches one of your ID values, as a sub folder under the directory where your database is stored, you could use this code:

MkDir CurrentProject.Path & "\" & ID

这篇关于为MS Access 2007中的记录创建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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