Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Mon, 4 Aug 2008 10:00:05 -0700,    group: microsoft.public.access.macros        back       


How to change data type   
I am importing a csv file into an Access database< but need to change the 
data types of several fields. Is there a way this can be done with a macro 
and without having to go into design mode?
date: Mon, 4 Aug 2008 10:00:05 -0700   author:   apex77

Re: How to change data type   
An alternative to simply accepting the structure and data types Access 
assigns when you import a CSV file (or Excel spreadsheet, or ...) is to 
treat what is imported as just the first step, and likely not 
well-normalized data.

Spend some time laying out a more permanent, well-normalized table 
structure.  Then create a series of queries that will "parse" the raw import 
data into their more appropriate and more permanent table structure.

You can create a macro that:  imports the csv file, runs parsing query#1, 
parsing query#2, ...

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

"apex77"  wrote in message 
news:D50F495D-60AB-4D2B-8537-975943FC2720@microsoft.com...
>I am importing a csv file into an Access database< but need to change the
> data types of several fields. Is there a way this can be done with a macro
> and without having to go into design mode?
date: Mon, 4 Aug 2008 16:49:47 -0700   author:   Jeff Boyce

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us