My Assistant
![]() ![]() |
|
|
May 5 2012, 08:04 PM
Post
#1
|
|
|
UtterAccess Veteran Posts: 317 From: Thailand |
Hi,
Can anyone point me to some sample code for linking to Access tables, Excel worksheets and text files? The names, paths would be stored in a table. Thanks, Peter |
|
|
|
May 5 2012, 08:38 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 17,609 From: Don Mills, ON (Canada) |
To relink tables, check Relink Access tables from code at "The Access Web".
To relink workbooks or text files, delete the existing linked tables and use TransferSpreadsheet or TransferText to create new linked tables. |
|
|
|
May 5 2012, 08:42 PM
Post
#3
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,649 From: Upper MI |
As an alternative, Relink / Swap Between Live, TEST and Local Data may provide a flexible solution for you.
hope this helps |
|
|
|
May 5 2012, 08:46 PM
Post
#4
|
|
|
UtterAccess Veteran Posts: 317 From: Thailand |
As an alternative, Relink / Swap Between Live, TEST and Local Data may provide a flexible solution for you. hope this helps That looks like what I need - I'll give it a try. Thank you. |
|
|
|
May 5 2012, 09:24 PM
Post
#5
|
|
|
UtterAccess Veteran Posts: 317 From: Thailand |
As an alternative, Relink / Swap Between Live, TEST and Local Data may provide a flexible solution for you. hope this helps One thing - I had to modify the code from "mdb" to "accdb". Also, I do not understand the "use" checkbox. Could you explain that? Thanks, Peter |
|
|
|
May 5 2012, 10:50 PM
Post
#6
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,649 From: Upper MI |
Peter,
The "Use" check box means that if the item is checked, it WILL be relinked. I added that feature to keep a list of tables or other sources that were not always used. So, if you want the table to be re-linked, be sur ethe "Use" checkbox is ticked. Otherwise, the referenced table will not be linked at re-link time. |
|
|
|
May 5 2012, 10:57 PM
Post
#7
|
|
|
UtterAccess Veteran Posts: 317 From: Thailand |
It was probably a silly question but I did not see it referenced in the code. I guess it must be there somewhere. OK - I will modify it to be checked by default otherwise the user will have to check 300 checkboxes!
Thanks, Peter |
|
|
|
May 6 2012, 08:20 AM
Post
#8
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,649 From: Upper MI |
Hmmm, you may be right and the "Use" box may not be utilized in that specific version. You can ignore it, make it invisible or remove it all together. Or, you could set it's default value to "True" and so on and so forth. It's highly customizable and does not need to make a user check every box every time.
Please feel free to roam about the code with your imagination and have your way with it. |
|
|
|
May 6 2012, 08:35 AM
Post
#9
|
|
|
UtterAccess Veteran Posts: 317 From: Thailand |
Hmmm, you may be right and the "Use" box may not be utilized in that specific version. You can ignore it, make it invisible or remove it all together. Or, you could set it's default value to "True" and so on and so forth. It's highly customizable and does not need to make a user check every box every time. Please feel free to roam about the code with your imagination and have your way with it. It's working great once I adjusted the code to look for an accdb back end. I think it needs something like a find and replace function for the connection string - I will add that. It's really nicely done. Looks great and is so easy to customize to add transfer spreadsheet and transfertext commands as well. No other relinking code or interface I have come across has provision for other than database tables. Good one, mate! |
|
|
|
May 6 2012, 09:59 AM
Post
#10
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,649 From: Upper MI |
Glad you like it and that we could help.
Good luck with your projects! |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 07:32 PM |