PDA

View Full Version : button to open another database


ABC123

Jeff Snyder
04-14-2000, 12:50 PM
I was wondering what the procedure would be to create a button on a form that would then allow access to a form in another A5 database? I imagine that it would necessitate some code writing and I am not well versed in Xbasic coding. I appreciate any help.

Jeff

Selwyn Rabins
04-14-2000, 01:00 PM
you can't do it.

just put the table in the database. (file/add table... menu)

a table can be a member of multiple databses.

once you put the table in that database, then you can open any form for that table

Dan Blank
04-14-2000, 08:00 PM
Well true that you can't open a form in another database, I have devised a way to open the second used database from the file menu.

I made a button placed it on a form, then using action scripting I used the send keys (system tool). Then I hit Alt F, down (13 times to get to the second database on my file menu) then Enter. Then Next/Finish. Then save the form.

Now when I press that button the current database closes and the second database on my file menu opens. Then make a button on that database menu and close and open back to the First database.

Maybe this will help??
Dan

CALocklin
04-15-2000, 06:45 PM
Dan, you're right, that works. You can even create a simple Xbasic script that will open another database in a new window. (That way you don't need to worry about whether it was previously used or which number it is on the list.) But, why go through all that when you can just add the table to your current db as Selwyn suggested. That way it will also be much faster.

Phil Rolf
04-15-2000, 07:36 PM
I hope in Version 5 that there is the ability to open another database. I agree, put in the database the tables that you feel you need. However, I do NOT want to mix employee information tables with general accounting type tables. I personnally feel more comfortable in having multiple databases to seperate different functions of the company. To have the ability to place a button on a form to switch Db's would be great.

That's my two cents worth.