New Field Data Type Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to build/run a make-table query that automatically creates an
empty field with a data type OTHER than text, and OTHER than binary?

I'm trying to automate a process where I don't have to go into the table's
design view to change the text field into another type.

Thanks,
Jacob
 
You can always use Alter Table to add a new field to the table

CurrentDb.Execute "ALTER TABLE [TableName] ADD COLUMN MyDate DATETIME"
 
Jacob

You've explained "how" you want to accomplish something.

Now, how 'bout the "why"?

It would be fairly unusual for a well-normalized relational database to need
to alter field types. What is it that's happening in your situation that
leads you to believe that you need to?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Try using an expression like one of the following for the empty field you
are trying to create.

IIF(True,Null,Clng(1))

IIF(True,Null,CDbl(1))

IIF(True,Null,CBool(0))


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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