N
NEWER USER
Using Code, I am importing a .txt file into an Access 2003 database, opening
the Table, Inserting Column(s), and then switching to Design View. The New
columns are formatted by Default for Text data type. Is there anyway to
change the Data type to say Number or Memo by use of some coding rather than
me having to switch to Design View and manually change the Data type? My
Code is as follows:
Function Import_CROSS()
On Error GoTo Import_CROSS_Err
'Import CROSS text file
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdImport
DoCmd.OpenTable "CROSS", acViewNormal, acEdit
DoCmd.RunCommand acCmdInsertTableColumn
DoCmd.RunCommand acCmdInsertTableColumn
DoCmd.RunCommand acCmdDesignView
DoCmd.SetWarnings True
Import_CROSS_Exit:
Exit Function
Import_CROSS_Err:
MsgBox Error$
Resume Import_CROSS_Exit
End Function
Any help appreciated. Thanks
the Table, Inserting Column(s), and then switching to Design View. The New
columns are formatted by Default for Text data type. Is there anyway to
change the Data type to say Number or Memo by use of some coding rather than
me having to switch to Design View and manually change the Data type? My
Code is as follows:
Function Import_CROSS()
On Error GoTo Import_CROSS_Err
'Import CROSS text file
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdImport
DoCmd.OpenTable "CROSS", acViewNormal, acEdit
DoCmd.RunCommand acCmdInsertTableColumn
DoCmd.RunCommand acCmdInsertTableColumn
DoCmd.RunCommand acCmdDesignView
DoCmd.SetWarnings True
Import_CROSS_Exit:
Exit Function
Import_CROSS_Err:
MsgBox Error$
Resume Import_CROSS_Exit
End Function
Any help appreciated. Thanks