(重新)同时链接多个前端数据库的表 [英] (Re)link tables for multiple front end databases at same time

查看:214
本文介绍了(重新)同时链接多个前端数据库的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


场景:

基于相同后端数据库的3个前端数据库。


所有前端部件都在同一个文件夹中(=>我知道他们的路径)并且具有相同的链接表结构。

一个或两个或所有可以取消链接(在tme)到后端部分。


我所知道的:

通过VBA将前端部分重新连接到后端部分(无论后面有什么路径)结束部分)。


我有什么:

一个非常简单的向导(重新)链接表。

此时这个向导在所有三个前端部分实现(我认为这不是最好的主意,而我只能设计一次并在我需要的地方使用它,但我稍后会看到)


我想做什么:

当我运行我的向导(从一个前端部分),在我(重新)链接表之后(所以我可以保存后端部分的路径) ),为其他两个前端部件自动执行相同的工作。

最好不要打开其他前端部件(以避免在这部分中运行任何代码)。如果无法避免打开它,我想我可以开发代码来跳过打开它时通常运行的代码。当然我需要其他代码才能在向导完成工作后关闭它。


希望你明白我的意思。


使用其他词语,这个帖子的标题可以是如何从一个数据库运行代码到另一个数据库(不打开第二个)


谢谢!

Hi !

Scenario:
3 front end databases based on the same back end database.

All front end parts are in the same folder (=> I know their paths) and have the same structure of linked tables.
One OR two OR all can be unlinked (at a tme) to the back end part.

What I know:
To relink a front end part to a back end part via VBA (no matter what path has the back end part).

What I have:
A very simple wizard to (re)link tables.
At this time this "wizard" is implemented in all three front end parts (I think that is not the best idea while I can design only once and use it from where I need, but I''ll see later about)

What I wish to do:
When I run my wizard (from one of the front end part), after I (re)link tables (so I can save the path for the back end part), automatically do the same job for the other two front end parts.
The best will be WITHOUT open the other front end parts (to avoid run any code in this parts). If can''t be avoid to open it I think I can develop code to skip the code which normally running when open it). Of course I need other code to close it after the wizard do the job.

Hope you understand what I mean.

Using other words, the title of this thread can be "How to run code from one database to another one (without open the second one)"

Thank you !

推荐答案

有一个名为 OpenDatabase()的DAO方法,它允许您打开额外的数据库。与 OpenCurrentDatabase()不同,它不需要关闭当前数据库。我想你可以从那里完成剩下的工作。
There is a DAO method called OpenDatabase() which allows you to open extra databases. Unlike OpenCurrentDatabase(), it doesn''t require that the current database is closed to do it. I imagine you can work the rest out from there.


谢谢!


总是很乐意帮助Mihail: - )
Always a pleasure to help Mihail :-)


这篇关于(重新)同时链接多个前端数据库的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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