469,643 Members | 1,243 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

URGENT! How to delete a field in a linked back end table?

After many years of working with Access, I am FINALLY required to
delete a single field from a table in a linked back-end data base and
I must do it fro the FRONT end! There MUST be a way to do this.

SQL ALTER TABLE code does not work because the table is linked. I
cannot find a "Delete field" method in DAO. I hope I'm overlooking
it.

Any advice will be appreciated.

--LW
Nov 12 '05 #1
2 3032
TC
Open the back-end database from the front end, then use the Delete method of
the Fields collection of the TableDef object:

(untested)

dim db as database
set db = dbengine.opendatabase ("C:\my back end.mdb")
db.tabledefs![BackEndTable].fields.delete "bad field! bad field!" ' <
field name there.
db.close
set db = nothing

Then be careful to refresh the font-end link:

set db = currentdb()
db.tabledefs![FrontEndTable].refresh
set db = nothing

There may be a few typos above, but I'm sure you get the point.

HTH,
TC
"LaurenW" <re**********@nospam.zap> wrote in message
news:c3********************************@4ax.com...
After many years of working with Access, I am FINALLY required to
delete a single field from a table in a linked back-end data base and
I must do it fro the FRONT end! There MUST be a way to do this.

SQL ALTER TABLE code does not work because the table is linked. I
cannot find a "Delete field" method in DAO. I hope I'm overlooking
it.

Any advice will be appreciated.

--LW

Nov 12 '05 #2
Thanks TC. I probable overlooked this because I could not find
anything in the ADH about it and the help in my copy of Access no
longer responds to some F1 requests except to say the help file is
damaged and urges me to repair it - a process which LOOKS like it's
working but fails to resolve the problem. I don't know why but I've
ignored it because I so rarely need to use it anymore.

I know this is off the point of this post but does anyone know why the
Access Help system gets "holes" in it sometimes?
On Mon, 24 Nov 2003 14:41:36 +1200, "TC" <a@b.c.d> wrote:
Open the back-end database from the front end, then use the Delete method of
the Fields collection of the TableDef object:

(untested)

dim db as database
set db = dbengine.opendatabase ("C:\my back end.mdb")
db.tabledefs![BackEndTable].fields.delete "bad field! bad field!" ' <
field name there.
db.close
set db = nothing

Then be careful to refresh the font-end link:

set db = currentdb()
db.tabledefs![FrontEndTable].refresh
set db = nothing

There may be a few typos above, but I'm sure you get the point.

HTH,
TC
"LaurenW" <re**********@nospam.zap> wrote in message
news:c3********************************@4ax.com.. .
After many years of working with Access, I am FINALLY required to
delete a single field from a table in a linked back-end data base and
I must do it fro the FRONT end! There MUST be a way to do this.

SQL ALTER TABLE code does not work because the table is linked. I
cannot find a "Delete field" method in DAO. I hope I'm overlooking
it.

Any advice will be appreciated.

--LW


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Tamir Khason | last post: by
16 posts views Thread by | last post: by
7 posts views Thread by zeyais | last post: by
33 posts views Thread by dembla | last post: by
8 posts views Thread by ginnisharma1 | last post: by
1 post views Thread by alok sengar | last post: by
17 posts views Thread by Saps | last post: by
3 posts views Thread by N. Spiker | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.