ALTER TABLE Query Pops-Up an empty Message Box

G

Guest

I need help.. I have a table with data, the column that I want to alter is
completely empty and originally set to text(255)

COL1 COL2 COL3
10 YELLOW
11 RED
12 BLUE

when I try the following SQL command in VB:
DoCmd.RunSQL "ALTER TABLE UNDEF_FLAT ALTER COLUMN COL2 INTEGER;"

Automagically, a modal pop-up Message Box with the window title being the
name of the database, the Qustion (?) Icon, NO MESSAGE what-so-ever, and the
only two buttons that show up are "OK" and "CANCEL". The column IS altered
correctly to an INTEGER

while debuging.. if I hit OK... code continues normally and the table is
altered correctly to a LONG INTEGER/Number data type..

My problem is that the empty message box pops-up.. how can I avoid the
pop-up message box? what does it mean?? I'm lost.. again I ask assistance to
the experts and gurus and thak you all in advance..
 
G

Guest

Found an answer, by using the following command in VB from a previous post:

CurrentDb.Execute "ALTER TABLE UNDEF_FLAT ALTER COLUMN COL2 INTEGER;"

avoids the "empty" message box from appearing.. but I'm still not sure why a
DoCmd.RunSQL with the same SQL statement does create it??

if anyone has insight on this thanks..
 
G

Guest

I found an answer by using the following VB code instead:

CurrentDb.Execute "ALTER TABLE UNDEF_FLAT ALTER COL2 codeNam INTEGER;"

I still wonder why the DoCmd.RunSQL would pop-up that "empty" message box..
any insight will be appreciated..

thanx
 

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

Top