By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

Rename tables from external program

P: n/a
Hi all,

I simply like to write a small program to rename tables in an Access
database. I created VBA modules inside Access but I don't want to open
the database for a simple rename of a table or two.

Any suggestion is welcome.
If you suggest e.g. VB, does anyone have a sample code of a similar
task?

Peter

May 12 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
pgabrian wrote:
Hi all,

I simply like to write a small program to rename tables in an Access
database. I created VBA modules inside Access but I don't want to open
the database for a simple rename of a table or two.

Any suggestion is welcome.
If you suggest e.g. VB, does anyone have a sample code of a similar
task?

Peter

So you are writing this in...what language?
May 13 '06 #2

P: n/a
"pgabrian" <pe***********@eu.irco.com> wrote in
news:11*********************@i40g2000cwc.googlegro ups.com:
I simply like to write a small program to rename tables in an Access
database. I created VBA modules inside Access but I don't want to open
the database for a simple rename of a table or two.


Holy Mary Mother of God!
May 13 '06 #3

P: n/a
DFS
Lyle Fairfield wrote:
"pgabrian" <pe***********@eu.irco.com> wrote in
news:11*********************@i40g2000cwc.googlegro ups.com:
I simply like to write a small program to rename tables in an Access
database. I created VBA modules inside Access but I don't want to
open the database for a simple rename of a table or two.


Holy Mary Mother of God!


HAHAHA!!!! That is scary.

May 13 '06 #4

P: n/a

"Lyle Fairfield" <ly***********@aim.com> schreef in bericht news:Xn*********************************@216.221.8 1.119...

Holy Mary Mother of God!


ROFL (by back hurts now ...)
You did it again! you made my day Lyle!

Arno R
May 13 '06 #5

P: n/a
pgabrian wrote:
Hi all,

I simply like to write a small program to rename tables in an Access
database. I created VBA modules inside Access but I don't want to open
the database for a simple rename of a table or two.


So do you want to use this to screw up a competitor's mdb?

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
May 13 '06 #6

P: n/a
Code for VB6.

Dim db As DAO.Database
Dim tbf As TableDef

Set db = DBEngine.OpenDatabase("C:\stp.mdb")
Set tbf = db.TableDefs("TableName")

tbf.Name = "NewTableName"

set tbf = nothing
set db = nothing

dont forget to add reference to Microsoft DAO.

May 15 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.