-2
是否有可能通过使用VBA访问数据类型
DoCmd.TransferText acImportDelim, acSpreadsheetTypeText, strFile, strPathFile, blnHasFieldNames
要改变一个列的数据类型从一个电话号码发短信?使用VBA访问?
是否有可能通过使用VBA访问数据类型
DoCmd.TransferText acImportDelim, acSpreadsheetTypeText, strFile, strPathFile, blnHasFieldNames
要改变一个列的数据类型从一个电话号码发短信?使用VBA访问?
Sub AlterTableX1()
Dim dbs As Database
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Add the Salary field to the Employees table
' and make it a Money data type.
dbs.Execute "ALTER TABLE Employees " _
& "ADD COLUMN SomeNumber Number;"
dbs.Close
End Sub
查看更多信息。
你能否给出一些关于这个问题的解释? –
我相信你正试图将文本文件导入到Access中,然后在导入之后你想要将导入并解释为数字的列更改为TEXT的数据类型?如果是这样,你可以创建一个导入规范来设置该列的数据类型,或者你可以在导入后改变表格,如:currentdb.Execute“ALTER TABLE [MyTable] ALTER COLUMN [FldA] TEXT(100)” –