Results 1 to 3 of 3
  1. #1
    nd0911 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    31

    access multiple users connections error

    Hello,



    I have a developed a nice access file and I split the file to front-end and back-end.

    My DB (back-end) is on a small local server, and the fornt-end was copyed to 3 PC's on the network.

    The technique I'm useing to connect the DB from the Front-end is when end user open his front-end, the code check if some table can use RefreshLink methud, if error occurs than a small "popup form" ask end user to browse to the DB and reconnect.

    The connection/reconnection is this code:

    Private Sub b_Submit_Click()
    Dim Db As DAO.Database
    Dim tDef As DAO.TableDef
    Dim TableName As String


    Set Db = CurrentDb()


    For Each tDef In Db.TableDefs
    If Len(tDef.Connect) > 1 Then
    If tDef.Connect <> ";DATABASE=" & lb_Path.Caption Then 'only relink tables if the are not linked right
    If Left(tDef.Connect, 4) <> "ODBC" Then 'Don't want to relink any ODBC tables
    TableName = tDef.Name
    Db.TableDefs(TableName).Connect = "MS Access;PWD=" & DATABASE_PASSWORD & ";DATABASE=" & lb_Path.Caption
    Db.TableDefs(TableName).RefreshLink
    End If
    End If
    End If
    Next tDef


    DoCmd.Close


    End Sub



    The files is working very good when one or two end users working together but when I'm trying to open the third file/from-end, the first or the second file/front-end is disconnected.

    I have to say that this is my first development on access (I'm a Excel VBA person), so I dont know if my techniques acceptable in access or maybe this issue occurs because the small server ?

    thank you !!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    dont complicate this.
    just link in the tables so its all ready when the user starts the app. (no VB needed)

    Nobody is interested in the complications of the backend.
    If you want, hide the tables.

  3. #3
    nd0911 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    31
    but if the path of the DB will change the front-end will not find the DB, am I right ?

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

Similar Threads

  1. Can multiple users open & use Access all at once
    By Mohapi Taole in forum Access
    Replies: 1
    Last Post: 09-25-2014, 02:40 AM
  2. Replies: 4
    Last Post: 01-15-2014, 01:00 PM
  3. Multiple connections to a single backend
    By shabbaranks in forum Access
    Replies: 1
    Last Post: 01-09-2012, 04:38 AM
  4. Running Access for multiple users
    By itm in forum Access
    Replies: 2
    Last Post: 09-08-2011, 08:29 AM
  5. Error using left join accessing 2 active connections
    By peterg2000 in forum Programming
    Replies: 0
    Last Post: 10-05-2009, 05:04 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