通用访问VBA代码不会转移到另一个数据库 [英] Generic Access VBA Code wont transfer to another database

查看:74
本文介绍了通用访问VBA代码不会转移到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法拼凑了创建备份文件夹的代码,然后以新名称Backup YYYY-MMM-DD HH.MM将(Access 2000)数据库复制到其中。

它在我创建的数据库中运行良好,可以练习和创建代码,但是当我将它复制并粘贴到主数据库时,它都不起作用,我不知道为什么。

我知道代码可能很乱,但我一年前才开始学习VB,所以非常感谢所有的帮助:


ive managed to piece together this code that creates a backup folder and then copies the (Access 2000) database into it under the new name "Backup YYYY-MMM-DD HH.MM".

It worked fine in the database I created to practise and create the code, but when i copy and paste it to the main database none of it works, and i have no idea why.

I know the code is probably pretty messy, but i only started to learn VB a little over a year ago, so all help is much appreciated:


展开 | 选择 | Wrap | 行号

推荐答案

代码停止在哪一行?



代码在什么行停止?
At what line is the code stopping?



我已经测试了代码,在文档链接之外它似乎工作正常。您是否在尝试创建此文件的网络上写了特权。


Mary

I''ve tested the code and outside of the document link it seems to be working fine. Have you got write privilages on the network in which you are trying to create this file.

Mary


10块钱说你需要包括您图书馆的参考资料。查看旧数据库并查看已检查的引用。确保它们与您在新数据库中的当前内容相匹配。你的代码看起来很稳定,所以我没有看到问题。
10 bucks says that you need to include a reference from your library. Check out the old database and look at the references you had checked off. Make sure that they match what you currently have in the new DB. Your code looks solid so I don''t see the problem.


这篇关于通用访问VBA代码不会转移到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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