Results 1 to 4 of 4
  1. #1
    agosfernandes is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2017
    Posts
    10

    database connection error

    Hi!



    I've created a database and all was working to the perfection... in my desktop!
    Once I've split it (one file without any tables, just forms, reports, etc. and another with the tables only) in a network folder I'm getting the yellow VBA color highlight in this line:

    Set rs_users = db.OpenRecordset("Users", dbOpenTable)

    Do I need to change the database path somewhere??

    Thank you!

  2. #2
    agosfernandes is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2017
    Posts
    10
    Nevermind... figured it out.

    Just needed to define its path: OpenDatabase("Q:\...

    Thanks anyway

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Might need to see all your code. From your FE databases(one with forms), click on your linked tables to make sure you have a good connection. Go to the top of the code window, hit Debug and Compile and see what message it gives you. Also if you get no message but code just stops, could be bug so just copy that link of code, Delete the line of code, hit Save. Then copy that line back and do debug/compile again and save, etc. Try it again.

  4. #4
    agosfernandes is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2017
    Posts
    10
    I believe I fixed the problem:

    just needed to fix the database tables location like this:

    Set db = OpenDatabase("C:\Path\To\Database.accdb")

    instead of just:

    Set db = CurrentDb

    I am still checking the whole db

    Thanks for your help!

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

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2016, 05:05 AM
  2. Connection Error
    By RayMilhon in forum SQL Server
    Replies: 3
    Last Post: 02-17-2015, 11:23 PM
  3. Replies: 2
    Last Post: 01-30-2014, 09:28 AM
  4. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  5. Database Connection Error
    By pgabell in forum Access
    Replies: 1
    Last Post: 01-17-2009, 07:24 AM

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