Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shifting into a locked database with code.

Status
Not open for further replies.

Maquis

Programmer
Jul 19, 2001
934
US
Hi guys. I'm trying to write a "master" database that I can use to perform administrative tasks on other databases that I've written. I've never done this before, but I would like to get it working just for the educational value alone.

For step 1, here's what I would ideally like to have this database do.

1. Prompt me for a database to open through a Common Dialog box. (I have this working thanks to some code I found posted here earlier. :) )

2. Have the code then actually open the database either in the current instance of Access or another instance. But, here's where it gets tricky. I need the code to open the database and skip that database's startup routines exactly the way it does when you shift+open a database.

Is this possible? Could one of the geniuses lurking here give me some code that would get me started. Maq B-)
<insert witty signature here>
 
What &quot;administrative tasks&quot; are you after?
Do you need data from the tables of those other databases? DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Well, eventually I would like the database to be able to &quot;map&quot; the selected database. Read the tables, queries, forms, code, etc and see how they all inter-relate. But that is down the road a ways and it's something I would like to work on myself rather than be given the code outright to do it.

For now I would like to find a way to use code to &quot;shift into&quot; a database that has a start-up form and it's database window and toolbars hidden. I would like to be able to pick a database to open and have the thing automatically open to the database window like it does when you &quot;shift into&quot; it. It just makes it more convenient for me when my users call and want things changed.

Is that possible? Maq B-)
<insert witty signature here>
 
Hi Maq!

I don't know if you can open a database through code that way or not. But it seems to me that you should be able to write a public function in a hidden module which will at least allow you to use the F11 key to see the database. You could set up a hidden macro to call the code and run the macro from code after opening the database. You could also replace your toolbars and menu bars in the same code.

hth
Jeff Bridgham
 
Thanks Jeff. I'm not used to doing this in code so my brain didn't think of stuff like that. I'll keep playing around with it. I want to be able to get into the design myself, but still keep it locked for any users who may run the database while I'm in it. Maq B-)
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top