Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Conversion / February 2004

Tip: Looking for answers? Try searching our database.

[VB] Convert programmatically  for 97 to  2002 with runtime only

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
termoPilucco - 23 Feb 2004 15:22 GMT
Hello, i have a problem instancing Access Application;
this code segment create a new instance of Access (2002 in my case) and
convert an old database in 2002 format.

Dim XpApp As Access.Application
Set XpApp = New Access.Application
XpApp.Visible = False
Call XpApp.ConvertAccessProject(strSrcDb, strDestDb, acFileFormatAccess2002)
XpApp.Quit
set XpApp= nothing

It works fine for me because i have Access 2002 application installed.
The problem is my client dont have the entire application installed, but
only the runtime.
So i get aoutmation error as the code reach the line "Set XpApp = New
Access.Application"

I know MS sugget this code to convert mdb to a 2002 format:
x = Shell("C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE " &
Chr(34) _
& strOLDDB & Chr(34) & " /Convert " & Chr(34) & strNewDb & Chr(34))
But i dont like the idea.

Can Anyone help me?
thanks and sorry for barbaric english,
termoPilucco
termoPilucco - 23 Feb 2004 17:03 GMT
"termoPilucco"  ha scritto nel messaggio:

> I know MS sugget this code to convert mdb to a 2002 format:
> x = Shell("C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE "
>  &  Chr(34) _
> & strOLDDB & Chr(34) & " /Convert " & Chr(34) & strNewDb &
> Chr(34))

Edit:
this code (with some correction to synchronize  the result) works on runtime
environment but:
-Runtime interface is showed up and it ask user for a confirmation
-Conversion format is implicit, so i am not sure if mdb result in either
2000 or 2002 format (infact in my test with Access 2002 runtime any
conversion go to 2000 format).

There are any other way to convert programmatically for 97 to 2002 with
runtime only (or using DAO/ADO and VB6)

thanks and sorry for barbaric english,
termoPilucco
david epsom dot com dot au - 24 Feb 2004 21:43 GMT
Send him a small mdb.
Tell him to double click on the mdb.
Put an autoexec macro in the small mdb.
In the autoexec macro run the Convert Access Project action.

If the location of the Source and Destination is unknown,
you will have to put a form/code etc in your small mdb.

or

> Set XpApp = New Access.Application

When using the runtime, you always need an mdb:
Set XpApp = GetObject("dummydb_2.mdb")

call XpApp.Convert...........

(david)

> Hello, i have a problem instancing Access Application;
> this code segment create a new instance of Access (2002 in my case) and
[quoted text clipped - 22 lines]
> thanks and sorry for barbaric english,
> termoPilucco
termoPilucco - 25 Feb 2004 08:34 GMT
"david  <david@epsomdotcomdotau> ha scritto:

> > Set XpApp = New Access.Application
>
> When using the runtime, you always need an
> mdb:
> Set XpApp = GetObject("dummydb_2.mdb")

> call XpApp.Convert...........

Thanks, the problem now is fixed.
Any procedure about the workaround is well explained here
http://tinyurl.com/3h59q

termoPilucco
david epsom dot com dot au - 25 Feb 2004 20:34 GMT
That works also.

> "david  <david@epsomdotcomdotau> ha scritto:
>
[quoted text clipped - 11 lines]
>
> termoPilucco
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.