Application.Version in Access 2007 run time

roh_8_it_3

Registered User.
Local time
Today, 07:32
Joined
Feb 15, 2005
Messages
79
Hello All,

I have updgraded to access 2007 but all the users of my application are on access 2003.So,I thought I will distribute my application through th access 2007 run time.I have no problem in that.I also have refereces to the excel in the VBA.So,the reference on my pc is the Office 12 but it fails on the clients pc as they have Office 11.

I am thinking to add this reference dynamically.Something like this -

If Application.Version = "12.0" Then
Application.References.AddFromFile "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE"
Else 'assuming everyone on access 2003.
Application.References.AddFromFile "C:\Program Files\Microsoft Office\Office11\EXCEL.EXE"
End If

Now ,I dont know what would be the value of application.version when this application will be run via the access 2007 run time.If it would be 12 then I guess the code above will fail.

Any help on this.Thanks
 
you can always test how your db will react under runtime environment by useing command line switch "/runtime" as in:
"c:\program files\microsoft office\office12\msaccess.exe" /runtime "c:\My Folder\My Database.accdb"

yet remember , one fatal effect of runtime environment is that runtime errors (ex: entering charachters in a numeric field) causes the application to shutdown just like a visual basic application would if an error was not covered in code than rather display an error message box and continue like one is used to in ms access full installation ;)
 

Users who are viewing this thread

Back
Top Bottom