Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SETTING DATA TYPE IN TABLE

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I have a procedure that imports a text file from a web server
ImportTable:
'Import orders text file from web server
DoCmd.TransferText acImportDelim, "novorders Link Specification", "tbl_weborders", "\\rose-bdc\inetpub\ True, "".

All the fields come across as data type = TEXT. Which is fine for all the fields except the date field. I want to be able to import the table and then change the data type for that one field from TEXT to DATE/TIME. How can I do this through VBA?

Thank you....
 
AFAIK, you canot actually "change" the data type of a field in a tabledef (TABLE). You would need to either

[tab]add a new field and transpose the text info to the new field (thereafter ignoring hte original field)

[tab]Format the existing text field as date type in all usage ([queries | Forms | Reports | ... ]

[tab]Import via a specification (.INI) file

[tab]Import to a temp table and append from the temp table to your final destiniation via code or query which accomplishes the conversion

[tab]other transforms not in (my) mind at present

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top