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 / Multiuser / Networking / September 2004

Tip: Looking for answers? Try searching our database.

Making a smart link that can open the right version of access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 03 Sep 2004 15:59 GMT
Hi,

I have designed a multiuser access 2000 database with a FE
and BE and .mdw file.  The BE and .mdw are on a shared
network folder and the FE resides on each users machine.  
I (with great help from this newsgroup!) then designed a
link to tie all three together.  The problem I am
encountering is that different users have Access 2000
installed in different directories (ie. office v. office1
v. office2000), and most also have access 97 (hence the
multiple access locations).  The link keeps getting
confused from machine to machine and if the link target is
changed to 97 by accident the link completely stops
working.  Unfortunately it is not feasible for me to
standardize the location of 2k on every users machine.  
Does anyone know how I can make a "smart" link that will
always find and open the proper version of access no
matter where it resides?

Secondly, I'm having the same issue on the code side.  I
have created an auto-update client (also thanks to this
newsgroup) that uses an 'update' db to copy down the
newest version of the FE to the clients desktop.  The
update db then reopens the FE after the new file has been
copied.  I got some great code from an mvp that calls the
aforementioned link to open the FE db securely.  It
follows:

Dim strOpenClient As String
Dim RetVal As Long
Const Dq As String = """"

strOpenClient = Dq & "C:\Program Files\Microsoft Office1
\Office\MSACCESS.EXE" & Dq & " "

strOpenClient = strOpenClient & Dq
& "c:\AnalyticalDatabase\PDAnalyticalDatabase.mdb" & Dq

strOpenClient = strOpenClient & " /wrkgrp:" & Dq & "S:\ARI
PD\PD Analytical Database\Database File\MDW
File\ANALYTICAL.MDW" & Dq

RetVal = Shell(strOpenClient, vbMaximizedFocus)

If RetVal Then AppActivate RetVal

As you can see I hardcoded the location of access 2k to
the 'Office1' folder as this is most commonly where it is
located.  Does anyone know how I can make code to find
where access 2k is on the current machine and then store
that location in the string variable rather that
hardcoding a location?

I know this is a long post and I really appreciate any
help!  Thanks in advance,

Eric
Douglas J. Steele - 03 Sep 2004 16:55 GMT
Take a look at AccVer from David Aylott
http://www.aylott.com.au/software.htm or Total Access Startup from FMS
http://www.fmsinc.com/products/startup

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi,
>
[quoted text clipped - 53 lines]
>
> Eric
Eric - 03 Sep 2004 17:55 GMT
Thanks, though I was hoping for a soultion in which I
wouldnt' have to buy and install third party software...

>-----Original Message-----
>Take a look at AccVer from David Aylott
[quoted text clipped - 60 lines]
>
>.
david epsom dot com dot au - 06 Sep 2004 01:48 GMT
You can make a small executable and use that to open
MDB files.  The small executable only has to use
DAO to check the db property
   db.Properties("AccessVersion")

Unfortunately, every time you start access, it associates
itself with .mdb, so you won't be able to just double
click a file to get the right version.

If you want double-click file associations, one way is
to rename all of your databases as .md8 .md0 .md2 .md3
etc, and create file associations to A97, A2K, A2K2 and
A2K3

(david)

> Thanks, though I was hoping for a soultion in which I
> wouldnt' have to buy and install third party software...
[quoted text clipped - 73 lines]
> >
> >.
Tony Toews - 08 Sep 2004 04:13 GMT
>I have designed a multiuser access 2000 database with a FE
>and BE and .mdw file.  The BE and .mdw are on a shared
[quoted text clipped - 12 lines]
>always find and open the proper version of access no
>matter where it resides?

FWIW I do have to do some work on security in my Auto FE Updater which
I hope to get to in the next few days.  Once that's done it will be
able to automatically update the FE.MDB/MDE from the server and open
it with the correct version of Access.

That doesn't address your immediate problem but if you send me an
email offline I'll be happy to email you as soon as the update is
ready.   I'd also like a tester.  <smile>

Oh yeah, it's free. For more info on the Auto FE Updater utility see
http://www.granite.ab.ca/access/autofe.htm

>As you can see I hardcoded the location of access 2k to
>the 'Office1' folder as this is most commonly where it is
>located.  Does anyone know how I can make code to find
>where access 2k is on the current machine and then store
>that location in the string variable rather that
>hardcoding a location?

I went looking in the registry for this.   You can search in the
registry using the current path of your own msaccess.exe and you'll
get a feel for which registry entry is appropriate.   I used
HKLM\Software\Microsoft\Office\9.0\Access\InstallRoot, OfficeBin

Tony
--
Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
david epsom dot com dot au - 08 Sep 2004 07:54 GMT
> I went looking in the registry for this.   You can search in the
> registry using the current path of your own msaccess.exe and you'll
[quoted text clipped - 3 lines]
> Tony
> --

On a loosely related theme:

To get to the OLE server (used to create an Access Object),
I've used the CLSID.  In the past, I took the default value of
the LocalServer32 key, which is a simple text string with the full
path.  But with Office 2K+, the default value is ignored, and the
LocalServer32 (REG_MULTI_SZ) value is used instead:

[HKEY_CLASSES_ROOT\CLSID\{73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}\LocalServer3
2]
@="C:\\PROGRA~1\\MI1933~1\\ART\\Office\\MSACCESS.EXE"
"LocalServer32"=hex(7):31,00,30,00,21,00,21,00,21,00,67,00,78,00,73,00,66,00
,\
28,00,4e,00,67,00,5d,00,71,00,46,00,60,00,48,00,7b,00,4c,00,73,00,41,00,43,\
00,43,00,45,00,53,00,53,00,46,00,69,00,6c,00,65,00,73,00,3e,00,70,00,6c,00,\
54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,00,31,00,26,00,4c,00,5b,\
00,2d,00,38,00,31,00,2d,00,5d,00,00,00,00,00

The second line ('@') is default value for the key. The third line
is the LocalServer32 value for the key. Translating the hex, you
get something like:
10!!!gxsf(Ng]qF'H{LsAccessFiles>p|T.......

In practice, I can disable the LocalServer32 value, and then the
Default value is used, but I would dearly like to understand the
LocalServer32 value. This information does NOT seem to be in MSDN
in any of the obvious places: The COM SDK documentation just describes
the old system, use the default value of the key and the plain text
string.

BTW, I also don't now how the Microsoft Office folder got a short
name of MI1933~1. (In this case, ART refers to an Access RunTime
installation.)

(david)
 
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.