Please help me. How to change the link address of a table using command button in the form?
Please help me. How to change the link address of a table using command button in the form?
Hi and welcome to the forum.
Haven't got a clue as to what you are asking. Care to explain further?
Thank u for your reply. By the way, I split the table of my access file. Now, I have already two access files, the MainFile that contains forms and reports and the other one is MainFile_be that contains splitted tables. The MainFile tables were link to the tables of MainFile_be. Now, I want to change the link address of the tables of my MainFile thru command button on my form.
How it can be done?
Aha. "Relink using code".
I took examples and modified the code to fit my requirements. You will have to do this also
Here are some links:
The Access Web
http://access.mvps.org/access/tables/tbl0009.htm
http://access.mvps.org/access/tables/tbl0012.htm
Roger's Access Library
http://www.rogersaccesslibrary.com/forum/topic334.html
http://www.rogersaccesslibrary.com/forum/topic286.html
this one links text files (but still a good example)
http://www.rogersaccesslibrary.com/forum/topic333.html
thank u for your reply ssanfu. But i just want to know the code to change the link address of the existing table. i don't need to create or change any data of the table only the link address using command button. I have 3 mdb files. MainFile, Link1, and Link2. MainFile contains forms,reports, and link tables. Link1 and Link2 mdb contain the same tables. Now, my form at MainFile contains two button if i clicked button1 MainFile tables link to Link1 mdb tables, if i clicked button2 MainFile tables link to Link2 mdb tables.
I will appreciate your reply.. Thank u..