Although the following preface is not needed for helping me with my real issue, I have provided it for context. Skip through if you wish.
My Access app is split with the forms/reports/etc front end database and the data (tables) backend database being linked.
I am running the app on two different pcs, one in the office and one out in the field on a Surface tablet.
Although the front end and back end files are within their same local directory, the office pc's files are in a different folder location than the tablet's.
After the laptop comes back from the field, the data on the office pc is updated by overwriting the data file on the office pc with the data file on the tablet.
After updating the data file, a problem arises when the app is opened up on the office pc. The stored linked file location that worked on the laptop is not the same as the actual location of the data file on the Office pc.
Unfortunately I know of no way to set the different link locations between the office pc and the tablet pc within Access's individual configurations on each pc. I therefore am creating a VBA action to automate the relink process.
To automate re-linking my back end database my VBA code is as follows:
DoCmd.RunCommand acCmdLinkedTableManager ' Opens up Linked Table Manager - this part works
SendKeys "%(s)", True 'Should select all linked tables (but it doesn't)
SendKeys "%(a)", True 'Should put check mark to always prompt for new location (but it doesn't)
SendKeys "{ENTER}", True 'Should activate the OKAY button (but it doesn't)
SendKeys "S:\CP_DATA.ACCDB{ENTER}", True 'Should type in the correct database file location and then press Enter (but it doesn't)
SendKeys "{ENTER}{TAB}{TAB}{ENTER}", True 'Should complete the link response dialog box acceptance to complete the re-link (but it doesn't)
OK, here is my issue:
Link Table Manager opens but SendKeys is not typing anything. When Link Table Manager is open I can manually press ALT-S and ALT-A to select all linked tables and to activate 'Always Prompt For New Location'.That works.
I believe I have the proper syntax for the SenKeys actions and have tried other variations without success. I have also tried using {TAB} and {ENTER} to get to and activate the Select All and Alway Prompt For New Location but also without success.
I must be missing something. Any help would very much be appreciated. Thank you in advance!