How to switch between databases by using a button

Hi,i have an application which consists of three databases. I want to link them together by using a button which switches between the databases. By clicking on this button the database should open, that´s no problem, but when the database is already open and you click on the button I only want to switch to the the database.

Is there a way to look, whether a database is already open? And is there a method which switches between the specified databases like using CTRL and TAB?

thanks Johannes

Subject: how to switch between databases by using a button…

  1. Create 3 button on page/form

[Button1]

@Command([CloseWindow]);

@Command([FileOpenDatabase]; “-ur server-”: “-ur db1.nsf-”);

[Button2]

@Command([CloseWindow]);

@Command([FileOpenDatabase]; “-ur server-”: “-ur db2.nsf-”);

[Button3]

@Command([CloseWindow]);

@Command([FileOpenDatabase]; “-ur server-”: “-ur db3.nsf-”);

This code will close the current active window, and open the desired db (so called switch between DB).

hope it can help u.

Subject: RE: how to switch between databases by using a button…

hi, thanks for the code.the first way I tried to switch between the db’s was this way, but it only works, when I put “posted” between the “@” and “Command” - like @PostedCommand([FileOpenDatabase]; “-ur server-”: “-ur db2.nsf-”)