modify the Type of Field in a Table From another MDB through a Command button

  • Thread starter Thread starter DREAMER
  • Start date Start date
D

DREAMER

Hello to all!

I hope can help me. By technical questions that would be to me very long to
explain, the following necessity arises to me:

I need To modify the Type of Field in a Table From another MDB through a
Command button. The field at issue would happen to be "Number" to "TEXT". Is
this possible one? I wait for alternatives.

Thanks in advance, and sorry for my poor english.

Dreamer. -
 
Hi

Is it not possible to open the other database and simply open the table in
design view and then change the field.

It seems very complex to do the codeing what will most proberly be a one off
operation.

Is there a reason why you need to do this from an outside DB
 
here, do the folwling:

Dim db As DAO.Database
Dim strSql As String


Set db = openDataBase("path to database to modify")

strSql = "alter table tblCustomers ALTER COLUMN MyNumField text(20)"

db.Execute strSql


So, the above simply opens the database in code, and then executes a alter
table command....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top