Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter structure of linked table

Status
Not open for further replies.

NattyP

MIS
Sep 1, 2001
45
JM
Hi,

I have a situation where I need to add and drop columns from a linked table.

Does anyone know if I can accomplish this by using the front-end database to trigger code located in the back-end database that will treat the table as being local.

Even if it can't be done could someone please remind me of how this is done. I read it once and can't seem to find it again.

I have tried making a reference to the backend database in the VB Editor. When this happens I can call functions from the debug window, but that same function cannot be found when I try to run it from code attached to a form event. Any ideas?

Quick responses appreciated.

Regards
NattyP
 
Okay Natty this is quick and dirty and I haven't tested this code but hopefully it will get you going.

Code:
Dim db as Databse

set db=openDatabase("somePath.mdb")
db.Execute "ALTER TABLE tblWhatever ADD COLUMN NewColumn INTEGER"

Hope this helps,
Rewdee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top