Results 1 to 2 of 2
  1. #1
    sunnie_joe is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    5

    Access 2010 - Launch DB from 2 different paths

    I have users with mix OS needs to access the database resides on the server and can’t be divided in 2 or have 2 separate databases. The VB within the db, has code reference to the MS Office see below, I can only use one.

    I’m looking for a way to incorporate both path in the script or an alternative method to enable both users access the db from multi OS Win-XP and Win-7.

    I can do it with a batch file using the following script, but I prefer doing it within the DB.



    If exist C:\"Program Files (x86)" GOTO 64BIT
    if not exist C:\"Program Files (x86)" GOTO 32BIT

    Thank you

    Database
    path= \\server-670\DATABASE\tsa.accdb

    Clients
    Windows XP 32bit OS with MS Access 2010 /32bit,
    path= C:\Program Files\Microsoft Office\office14\MSACCESS.EXE

    Windows 7 64bit OS with MS Access 2010 /32bit,
    path= C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE

    VB script
    Private Sub Command71_Click()
    Dim stAppName As String
    stAppName = "" & DLookup("[Link]", "Admin_Links", "[No] = 4") & ""
    If DLookup("[Type]", "Admin_Links", "[No] = 4") = "Database" Then
    Call Shell(stAppName, 1)
    Else
    Application.FollowHyperlink stAppName, , True
    End If
    ‘stAppName = "C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE\ \\server-670\DATABASE\tsa.accdb /wrkgrp \\server-670\DATABASE\tsa.mdw"
    ‘stAppName = "C:\Program Files\Microsoft Office\office14\MSACCESS.EXE\ \\server-670\DATABASE\tsa.accdb /wrkgrp \\server-670\DATABASE\tsa.mdw"
    End Sub

  2. #2
    sunnie_joe is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    5

    Simplify my post

    Access 2010 - Launch DB from 2 different paths

    I have users with mix OS needs to access the database resides on the server and can’t be divided in 2 or have 2 separate databases. The VB within the db, has code reference to the MS Office see below, I can only use one.

    I’m looking for a way to incorporate both path in the script or an alternative method to enable both users access the db from multi OS Win-XP and Win-7.

    Thank you

    Database
    path= \\server-670\DATABASE\tsa.accdb

    Clients
    Windows XP 32bit OS with MS Access 2010 /32bit,
    path= C:\Program Files\Microsoft Office\office14\MSACCESS.EXE

    Windows 7 64bit OS with MS Access 2010 /32bit,
    path= C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE

    ************************************************** *********************
    VB script
    Private Sub Command71_Click()
    Dim stAppName As String
    stAppName = "" & DLookup("[Link]", "Admin_Links", "[No] = 4") & ""
    If DLookup("[Type]", "Admin_Links", "[No] = 4") = "Database" Then
    Call Shell(stAppName, 1)
    Else
    Application.FollowHyperlink stAppName, , True
    End If

    ‘stAppName = "C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE" \\server-670\DATABASE\tsa.accdb
    ‘stAppName = "C:\Program Files\Microsoft Office\office14\MSACCESS.EXE" \\server-670\DATABASE\tsa.accdb

    End Sub

    ************************************************** *********************
    I can do it with a batch file using the following script, but I prefer doing it within the DB.

    If exist C:\"Program Files (x86)" GOTO 64BIT
    if not exist C:\"Program Files (x86)" GOTO 32BIT

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-06-2012, 10:32 AM
  2. Access 2007 will not launch
    By croydon in forum Access
    Replies: 0
    Last Post: 02-20-2012, 05:22 AM
  3. Retrieve images stored as file paths in Access
    By Nonz in forum Programming
    Replies: 4
    Last Post: 09-26-2011, 06:46 PM
  4. Replies: 2
    Last Post: 09-01-2011, 01:23 PM
  5. Setting paths different for each form
    By sailinxtc in forum Programming
    Replies: 9
    Last Post: 04-04-2010, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums