Question Connecting it all together (multiple modules)

mcdhappy80

Registered User.
Local time
Today, 12:53
Joined
Jun 22, 2009
Messages
347
I've split my main application in several different program modules. Now, I need to connect it together.

I'm asking for advice what is more better to do.

The way I'm thinking right now is, because I have several modules (access 07 databases), to create one more which will serve as main menu from which I will open and close modules (access applications), but I have one concern here:
when I open the module and then close it, I want to reopen the main menu application. Can this be done and how? What are the limitations if I use this approach?

The other way (the harder I think) is to export all the forms, reports and modules into a blank database and re-connect all the stuff I created, the problem here would be the fact I need to rename all the forms, because the one form that is used in 7 modules has the same name.

What do You think? What would You do?

Thank You
 
I don't understand what your question is. Could you please elaborate?
 
When I say "modules" I mean several Access 07 database files that act as separate programs and can work each on its own, but also You can use them all together, they ware all connected to the same back end database.
So to simplify the question, I'm asking should I create separate database with main menu and buttons from which I will open instances of these access databases? How do I open another access database, and then reopen the first database when the second one closes?
What is the VBA code to open another database?
Thank You
 
So you are talking about the best way to split your database and share the split parts between users correct?
 
So you are talking about the best way to split your database and share the split parts between users correct?
No, I'm searching the way to open another access database with the click of the button on form.
 
No, I'm searching the way to open another access database with the click of the button on form.
You should be able to use

Code:
Dim acDB As Access.Application
Set acDB = New Access.Application
 
acDB.OpenCurrentDatabase ("FilePathAndFileNameHere")
acDB.Visible = True
 
You should be able to use

Code:
Dim acDB As Access.Application
Set acDB = New Access.Application
 
acDB.OpenCurrentDatabase ("FilePathAndFileNameHere")
acDB.Visible = True
Why do I get an error when I try to open accde version renamed to accdr?
What properties, that I can manipulate with, has an opened application?
I would like to open application full screen but for now it opens maximized, how can I change this?

Thank You
 
Well, I tried it and you are right. It doesn't work with an ACCDR file.

But you can use this:

FollowHyperlink "FilePathAndFileNameHere"
 
I've read somewhere that I can use the Shell() command from VBA.
I tried and I got err no. 5 I think "invalid procedure ..." or something like that, why?
Can I do it with shell, open the accdr in full screen, and how?

Thank You
 
Yes, you can use Shell but you need to know what the application path is - like this example:

Code:
Shell "C:\Program Files\Microsoft Office\Office11\MSAccess.exe C:\Temp\MyDatabaseName.mdb",vbMaximizedFocus
 
Well, I tried it and you are right. It doesn't work with an ACCDR file.

But you can use this:

FollowHyperlink "FilePathAndFileNameHere"

I tried this command and it works perfect for accdb version, it opens it fullscreen even, but for the accdr, I get a message with two buttons, and when I click OK, the window opens maximized. Can I open the accdr full screen without the message popping out?

Thank You
 
I bet SOS would like to know what the error message was?
 
I bet SOS would like to know what the error message was?

The error message that is triggered by opening accdr with the hyperlink is on picture msg1 in attachment. In this example only the accdb and accde versions open as they should but I want to distribute the accdr version not the other two of course.

Yes, you can use Shell but you need to know what the application path is - like this example:

Code:
Shell "C:\Program Files\Microsoft Office\Office11\MSAccess.exe C:\Temp\MyDatabaseName.mdb",vbMaximizedFocus

I have Office 2007 so my app path is little different, and the shell variant doesn't work for me (the accdr), and it displays other two error messages. The app path that is shown on third picture is not the my app path, but some other (I assume default) app path.
I tried removing the Office 12 part,from the shell command, but then I get error no. 5 "illegal argument was passed", I also tried to remove the my application part from the Shell command and in that case access opens normally infull screen.

What am I doing wrong? Is there some other way to open accdr versions?
Thank You.
 

Attachments

Using SOS' method, you would need the runtime switch:

Code:
Shell "C:\Program Files\Microsoft Office\Office11\MSAccess.exe C:\Temp\MyDatabaseName.mdb /runtime",vbMaximizedFocus
If you say you're not sure where the access executable is located then try this (because it should work without the full path):

Code:
Shell "MSAccess.exe C:\Temp\MyDatabaseName.mdb /runtime",vbMaximizedFocus
Here's another way of opening the accdr too:
http://www.suodenjoki.dk/us/productions/articles/vbashellexecute.htm

To avoid the security warning, you would need to digitally sign the database before converting to runtime version. You may also need to add the path where the accdr resides as Trusted. You would need a third party software for this. The one that comes with Access 2007 (Office Button > Publish > Package and Sign) would only apply for the machine in which it was created (i think).
 
[SOLVED] Connecting it all together (multiple modules)

Thank You vbInet that article did the trick ;)
 

Users who are viewing this thread

Back
Top Bottom