dory550 lambert
asked on
VBA code MS ACCESS and ODBC
Hi Guys
In order to update my website I need to replace 3 access tables: table1, table2 and table3.
odbc for the sql server is 'PKC'
I am looking for vba code which will
1. delete the above 3 tables
2. replace them with 3 fresh tables (same tablenames)
The vba code is to run on access module (I am using office 365 with ms access)
Any help is appreciated
Thanks
Dory
In order to update my website I need to replace 3 access tables: table1, table2 and table3.
odbc for the sql server is 'PKC'
I am looking for vba code which will
1. delete the above 3 tables
2. replace them with 3 fresh tables (same tablenames)
The vba code is to run on access module (I am using office 365 with ms access)
Any help is appreciated
Thanks
Dory
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you want to update the data on SQL Server or do you want a local copy of that data?
In both cases link those tables in Access. Then you can either update the SQL Server side via the linked tables or you can create a local copy using table creation queries.
In both cases link those tables in Access. Then you can either update the SQL Server side via the linked tables or you can create a local copy using table creation queries.
ASKER
ste5an
I want to update the sql server
one vba procedure
I estimate it to be about 12-15 lines of code depending on your skills
You don't have to worry about "if exist" it always 'exists"
And you have to worry about 'overwrite' because tables are deleted first
Thanks
Dory
I want to update the sql server
one vba procedure
I estimate it to be about 12-15 lines of code depending on your skills
You don't have to worry about "if exist" it always 'exists"
And you have to worry about 'overwrite' because tables are deleted first
Thanks
Dory
In this case, you linke the tables, delete the data and insert the new data.
ASKER
John Tsioumpris
thank you for a very informative answer
Dory
thank you for a very informative answer
Dory
ASKER