![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
"Salad" <sa... (AT) oilandvinegar (DOT) com> wrote in message news:zfCdnU9tHNNIHsjRnZ2dnUVZ_u-dnZ2d (AT) earthlink (DOT) com... Albert D. Kallal wrote: Unfortunately the runtime environment does not support automation or you creating a new instance of access. I'm curious about that statement. *Does that also include Word, Outlook, and Excel? Well, READ carefully again what I further clarify in those posts. In fact as I stated, access doesn't know or care what language is being used here, from visual basic scripting, visual basic .net, FoxPro or word, or even another copy of access running, the language or what application here is not really an access particular issue in terms of automation. To state again: The access runtime shuts down if you don't supply a file name when you start it up. This behaviors been this way for very long time. If you think about this, it kind makes sense that if you click on the access runtime icon, because there is no user interface and there is no ability to open up a file, it would be rather quite silly to leave a copy of the application running in memory. If you clicked on that access icon, you would be launching multiple copies of access each time you click, and because the runtime has no user interface, you would have no way of shutting down the application. So the default behavior of the runtime is that, when you launch it or create an automated instance of the runtime, since there's no file name supplied, the application then simply shuts down. In effect it means that when you launch the runtime, you must supply in access file or database to open when you do so, and then the copy of access will remain running. The core problem or issue here is of course, is that when you automate an instance of access (createObject), it's not possible to supply the file name to be opened. Therefore logical reasoning and intellectual deduction makes one realize that this behavior means you can't use automation to create a running instance of access in this case. So this has absolutely nothing to do with behavior of word or outlook or excel or any other application that you attempt to launch. (they will all launch and run just fine even when you use the access runtime). If you're willing to think through all of the results of this behavior yourself, I only need to tell you one thing: The access runtime shuts down when it's launched without a file name supplied for it to work with. Everything else that follows is a result of the above information can then be intellectually realized and thought out by you. Of course the second piece of the puzzle is that when you automate access, you can't supply a file name, therefore logic dictates you can't use automation this case can you? So the limitation we are witnessing here is the results of a particular behavior of the access runtime, and that behavior is simply that acess shuts down when no file name is supplied. Albert K. |
#12
| |||
| |||
|
|
So this has absolutely nothing to do with behavior of word or outlook or excel or any other application that you attempt to launch. (they will all launch and run just fine even when you use the access runtime). |
#13
| |||
| |||
|
|
but my point is, the access runtime knows (should know the difference) between launched from explorer vs launched from automation |
#14
| |||
| |||
|
|
On Sun, 1 Aug 2010 12:37:29 -0700 (PDT), Roger wrote: but my point is, the access runtime knows (should know the difference) between launched from explorer vs launched from automation How can it? |
#15
| |||
| |||
|
|
But I wonder how Roger happened to be the first person to stumble into this difficulty since when the first runtime for Access hit the market, wasn't it Access 2000? |
|
The only reason I can imagine why he needs to programmatically modify from outside existing reports and forms would be that he has back end and front end in one file, so this one is the only way to deliver new versions of the program to customers without overwriting their data. Maybe I'm mistaked? |
#16
| |||
| |||
|
|
On 5 Aug., 01:52, Tony Toews wrote: On Sun, 1 Aug 2010 12:37:29 -0700 (PDT), Roger wrote: but my point is, the access runtime knows (should know the difference) between launched from explorer vs launched from automation How can it? I remember the old times of DOS and Assembler when we had tricks to find out whether the program had been launched from within a batch or by command.com or whatever. So I suppose Microsoft could fix the problem if they only wanted. But I wonder how Roger happened to be the first person to stumble into this difficulty since when the first runtime for Access hit the market, wasn't it Access 2000? The only reason I can imagine why he needs to programmatically modify from outside existing reports and forms would be that he has back end and front end in one file, so this one is the only way to deliver new versions of the program to customers without overwriting their data. Maybe I'm mistaked? Greetings Marco P |
#17
| |||
| |||
|
|
when the first runtime for Access hit the market, wasn't it Access 2000? |
#18
| |||
| |||
|
|
all my data is on sqlserver 2005, so I only have frontends I have many front end applications that need to inter communication for example, I have a quoting application that needs to report a quality issue (QMS) the QMS system is it's own application so in access97, the quoting application uses this function Dim obj As Access.Application On Error GoTo fErr Set obj = New Access.Application With obj .Visible = True .RefreshTitleBar .OpenCurrentDatabase "another.mdb" .run "createQMS" end with to start to QMS application and run a function that opens a form to create a new quality problem |
#19
| |||
| |||
|
|
Roger <lesperan... (AT) natpro (DOT) com> wrote innews:45e59b82-c838-4ed2-a681-378709b93915 (AT) q21g2000prm (DOT) googlegroups.co m: all my data is on sqlserver 2005, so I only have frontends I have many front end applications that need to inter communication for example, I have a quoting application that needs to report a quality issue (QMS) the QMS system is it's own application so in access97, the quoting application uses this function *Dim obj As Access.Application * * On Error GoTo fErr * * Set obj = New Access.Application * * With obj * * * * .Visible = True * * * * .RefreshTitleBar * * * * .OpenCurrentDatabase "another.mdb" * * * * .run "createQMS" * * end with to start to QMS application and run a function that opens a form to create a new quality problem I would never do this kind of thing. Do you not know about Application.Run? It's how you implement an add-in, and there are lots of possibilies there that would not require automating the other application. Of course, how hard that is to implement would depend on the level of complexity of what you're using from the other application, as well as various issues with what data to use and so forth, but all of those are issues that can be addressed and still work with the runtime. -- David W. Fenton * * * * * * * * *http://www.dfenton.com/ contact via website only * *http://www.dfenton.com/DFA/- Hide quoted text - - Show quoted text - |
#20
| |||
| |||
|
|
On Aug 5, 12:49*pm, "David W. Fenton" <NoEm... I would never do this kind of thing. Do you not know about Application.Run? It's how you implement an add-in, and there are lots of possibilies there that would not require automating the other application. Of course, how hard that is to implement would depend on the level of complexity of what you're using from the other application, as well as various issues with what data to use and so forth, but all of those are issues that can be addressed and still work with the runtime. in access97, application.run is what I used to run a function in another MDB application (per my code sample) application.run doesn't work with the runtime cause I can't create a new access.application |
![]() |
| Thread Tools | |
| Display Modes | |
| |