在新窗口中打开另一个数据库 [英] Open Another Database in a New Window

查看:79
本文介绍了在新窗口中打开另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试创建一个用作交换机的表单,以便从一个地方打开多个数据库。我希望用户能够在新窗口中单击按钮并打开现有数据库。我尝试了下面的代码,数据库闪烁然后消失(fyi - 我正在使用Access 2007)。有什么想法吗?

Hello,
I''m trying to create a form that works as a Switchboard to open a number of databases from one place. I want users to be able to click a button and open an existing database in a new window. I tried the following code and the database flashes open and then disappears (fyi - I''m using Access 2007). Any ideas?

展开 | 选择 | Wrap | 行号

推荐答案

  1. 问题是appAccess被声明为程序级变量,并在程序结束时立即销毁。将声明更改为表单模块中的私人声明。由于其他原因,以相同的方式声明strDB,如:
  1. The problem is that appAccess is declared as a Procedural Level Variable, and is destroyed immediately when the Procedure ends. Change the Declaration to either a Private Declaration in a Form Module. Declare strDB for other reasons, in the same manner, as in:
展开 | 选择 | Wrap | 行号



...

4.如有任何问题,请随时提出。
...
4. Any questions, feel free to ask.



我会在那里昵称并为您提供帮助;)


Q1。如果应用程序变量超出范围,应用程序是否必须关闭?


Q2。如果应用程序首先可见,是否允许进程无限期地继续(直到操作员关闭)?

I''ll nick in there and take you up on that ;)

Q1. If the application variable goes out of scope, will the application necessarily be closed?

Q2. If the application is made visible first, will that allow the process to continue indefinitely (until closed by the operator)?



我''在那里昵称并带你上去;)


Q1。如果应用程序变量超出范围,应用程序是否必须关闭?


Q2。如果首先使应用程序可见,那么是否允许该过程无限期地继续(直到操作员关闭)?
I''ll nick in there and take you up on that ;)

Q1. If the application variable goes out of scope, will the application necessarily be closed?

Q2. If the application is made visible first, will that allow the process to continue indefinitely (until closed by the operator)?


Q1。如果应用程序变量超出范围,应用程序是否必须关闭?
Q1. If the application variable goes out of scope, will the application necessarily be closed?



它不会出现,但您将无法引用appAccess对象的属性或方法,也无法对其任何事件作出反应。您将无法以编程方式关闭数据库。以下将在此当前上下文中生成对象必需错误:

It does not appear so, but you will not be able to reference the Properties or Methods of the appAccess Objects, as well as to react to any of its Events. You will not be able to Close the DB programmatically.The following will generate an Object Required Error in this current context:

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


这篇关于在新窗口中打开另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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