Access runtime automation

L

Loterken

if only access runtime is installed (not office)
can access runtime be used as an automation server ?
if so, with late and early binding
tia
 
S

Sylvain Lafontaine

You cannot use CreateObject to create an Access application from the runtime
but you can use a Shell comand to open one and then use the GetObject
function to get a reference to that instance. See the following article for
more details:

http://support.microsoft.com/kb/145707

For early binding, I don't know but as they are many different versions of
Access, my first reflex would be to use exclusively late binding.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)
 
A

Albert D. Kallal

As Sylvain points out, you sort of can.

The problem is if you create an instance of the access runtime, because you
can't supply the file name to open when you do this, the runtime actually
shuts down by itself.

However what you can do is shell out and launch a copy of the runtime using
shell. When you do this, then you can provide the access database files open
as a parameter in that shell command.

Once the addition of Access is launched and running, then you can use get
object in your code.

So you are free to use late binding, and in fact I think even early might
work, but you cannot use create object, you have to use get object to get a
running instance of access.

So the only change or limitation is that you have to have Access running and
launched before you attempt automate access runtime.

The above limitation does not exist for the full Eddition of Access, but as
the KB article linked to shows you can well work around this limitation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top