Results 1 to 5 of 5
  1. #1
    thebionicredneck2003 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2013
    Posts
    22

    Specifiying a connection string in ms access forms

    Hi guys,

    I have a question about connection strings. Basically I have an access front end and an access back end. It works fine for now, but when it gets rolled out, I don't want to have to manually relink the tables every time. Is it possible to hard-code the database connection strings for all the tables used in the solution as the paths won't change once deployed?

    Please note, I am a newbie and I know next to nothing about vba. I have seen lots of samples of code concerning issues similar to this, but I don't know where exactly to put the code in, so some simple guidance for an access newcomer on this would be appreciated.




    Many thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,619
    Code can relink the tables. Where are you 'rolling out' to? Just your internal network server? Here is how I manage split database: http://forums.aspfree.com/microsoft-...ue-323364.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    thebionicredneck2003 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2013
    Posts
    22
    Thanks for this. It looks like it will do what I need it to do.

    I have split the database into front end and back end and will be saving the back end on a network share and will circulate a front end version to the various users.

    In your link you said "Run this procedure in master copy of the frontend before it is copied to users"

    When you say run, what exactly do you mean? Do I have to put it in like an event or something? I apologise once again, as I am really asking noob questions, but I just want to be perfectly sure I am doing the right thing.


    Many thanks again

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,619
    The procedure sits in a general module I call Utilities. I manually run it when needed (not very often any more). I just put cursor anywhere in the procedure and click Run from the menu.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    thebionicredneck2003 is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2013
    Posts
    22
    Wow!!! June7 you are a genius. Thank you for your help and for your clear explanation on where to put the code.

    It works as expected. Very happy now

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

Similar Threads

  1. Replies: 6
    Last Post: 12-03-2012, 05:28 PM
  2. Replies: 0
    Last Post: 04-25-2012, 07:59 AM
  3. Replies: 1
    Last Post: 04-19-2012, 12:43 PM
  4. Create dynamic connection string to Access
    By janwane in forum Access
    Replies: 2
    Last Post: 10-07-2011, 06:56 AM
  5. Connection String
    By cradaa in forum Access
    Replies: 4
    Last Post: 05-24-2011, 07:28 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