Share via

linking a split database table in Access Runtime

Anonymous
2017-03-03T21:22:06+00:00

I built a database in MS Access 2010.  The end users are only using MS Access Runtime 2013 so I split the database before I transferred it to the new PCs.  There was no way for me to link the Front End to the back in runtime.  I used some code I got from JStreet Tech, and it works if I am on the computer that has Acess 2010 installed.  However, I get a "compiling error" when I run it on any of the 3 PCs that will be using this db.

Is there a better way to do this or is there a "bullet-proof" code to add to my db?

Thanks,

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

18 answers

Sort by: Most helpful
  1. Anonymous
    2017-03-10T05:36:55+00:00

    Thanks Tom.

    My post was a bit long, but I felt that if I did not try my “best” to explain “why” some folks gave additional advice then the poster would have wondered why we were “ignoring” him, or not trying to help. Or why are we sending someone on a wild goose chase. Not trying to make the poster or anyone else here look bad.

    Computers and using code when new to Access can be really frustrating. And part of the learning process is to learn why some people gave advice that might seem at first glance wrong.

    I found in these cases the only way "out" is to try our best and  spend “extra” time to explain why this occurred – even at the possible “expense” of some amazing talented people here who can “easy” take the hit for the team!

    At the end of the day, everyone here was great – including the person asking the question(s).

    Regards,

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada

    Was this answer helpful?

    0 comments No comments
  2. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2017-03-10T03:07:49+00:00

    Excellent Albert. 10 points for patience and clarity.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-03-09T21:37:28+00:00

    >> Using the code from Tom's link,

    You don’t need that code nor link that Tom posted.

    The information Tom provided was due to you having showed your compile error. That compile error suggested you are missing the code provided in that link.

    However, the j-street re-linker ALREADY provides that code. So you posted a compile error – that thus suggested that the fix was to go to that “link” to grab some code that you are missing.

    So Tom’s link was to provide some code was either removed by you, or missing when you imported the j-street link code. Everyone believed you had imported the j-street code correctly – but THEN you stated AFTER doing this you had compile errors. This information is now shown to be wrong.

    So when working with computers – if we assume you followed the instructions and you get that compile error, THEN YES you would have to go to that link Tom provide and grab that code.

    However, Tom had simply assumed you were following the advice here correctly.

    So now that we cleared up the above, you don’t need nor want to bother with that code Tom pointed to. In other words the compile error you posted DOES suggest you were missing that code. Since we resolved now that you had not imported the j-street code correctly in the first place, then you don’t need nor want to bother with that code link.

    If AFTER importing the j-street code that compile error existed, then yes you would and should import the “file dialog” code Tom pointed to.

    However once you cleared up that if you start over, import the j-street code and ZERO compile errors occurred, then the additional advice to fix your compile errors is NOT required by bothering with the link and code that Tom pointed to.

    So to be clear:

    If after importing the j-street code (as we all assumed you did correctly), if you were STILL having compile errors, then you would need to import that additional code Tom pointed to.

    However, now that we resolved that no compile errors exist after correctly importing the j-street code you thus don’t need to bother with that link and code Tom provided.

    And to be “really” clearer, the j-street code in fact “borrowed” and uses the code in Tom’s link.

    So you don’t need nor want to bother with the link provided Tom, since after “correctly” importing the j-street code you don’t have any compile errors and thus there is nothing to fix.

    The real lesson here is if you provide incorrect advice then the advice you receive here will also be incorrect. Computers don’t “guess”, but only follow instructions you give them. If you don’t follow instructions, then the advice you get will be wrong – this is what occurred in Tom’s case.

    >> my question would be:  Using the code from Tom's link

    As pointed out you don’t need that code or link – it is already part of the j-street code sample.

    >>what should I put in an autoexec macro and/or can I put a button on the screen to run the re-link manually.

    You don’t need to modify what is already in the AutoExec sample from j-street. ALL you have to do is import the AutoExec macro and should be good to go.

    >> can I put a button on the screen to run the re-link manually.

    You certainly could provide a button – but the AutoExec macro is called “auto” for a good reason – it will run on start-up automatic. So you really don’t need a button to run the re-link code if you simply import that AutoExec macro from the j-street sample. You can most certainly open the autoexec macro in design mode and take a quick look to see what is inside of that macro. (It simple runs the re-link function – and you can use the SAME code as that macro behind a button on a form if you wish).

    So behind a VBA button on a form you could use this line of code:

    jstCheckTableLinks_Full()

    However the above is exactly what is inside the AutoExec macro. So that “function” will “run” on application start-up since that is what “AutoExec” is for (to run some code on application start-up).

    So you really don’t need a form with a button to re-link if you choose to import and use the already pre-made and provided auto Exec macro for your convenience.

    Good luck!

    Regards,

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada

    Was this answer helpful?

    0 comments No comments