|
I am importing a .csv file into Access that has 37 fields. My problem is
that sometimes the last field only has data at the end of the column (it
looks like when you import a file into Access, for the last field, it
only checks the top few 'cells' to see if there is any data, if not, the
field is not imported).
How do I 'force' Access to import the field, regardless if there is data
in the top of the field or not? For instance, I might have 1,000 records
that I am importing. If only the last 100 records have data in that
field, then, I lose the data because it is not importing the field.
Thanks,
Grim Reaper
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! | |
Share:
|
Use an import spec.
Place a value in the last column of a sample csv.
Start the import manually: File | Get External | Import.
After selecting the CSV file, click the Advanced button to save an import
spec.
When you do the import in future, include the import spec in the
TransferText so Access knows how many columns it must get.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message
news:3f***********************@news.frii.net... I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for the last field, it only checks the top few 'cells' to see if there is any data, if not, the field is not imported).
How do I 'force' Access to import the field, regardless if there is data in the top of the field or not? For instance, I might have 1,000 records that I am importing. If only the last 100 records have data in that field, then, I lose the data because it is not importing the field. | | |
I don't quite remember the correct syntx but make sure the check box for the
"top record for field name" option is off. You might want to create a
record that will appear first in the native db sort and that has all the
fiel name discriptions so that when you import the file with the previous
said option on you won't have that many errors. If you cant create that
record, create it manually in a text editor. Hope this helps.
figueroa at ync dot com | | |
Hi Allen,
When I click the Advanced button, all I get is an Advanced Find dialog
box. How does one create and save an import spec? I'm jumping in here
because I've heard of an Import Spec but the help file doesn't mention
it.
Thanks
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>... Use an import spec.
Place a value in the last column of a sample csv. Start the import manually: File | Get External | Import. After selecting the CSV file, click the Advanced button to save an import spec.
When you do the import in future, include the import spec in the TransferText so Access knows how many columns it must get.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f***********************@news.frii.net... I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for the last field, it only checks the top few 'cells' to see if there is any data, if not, the field is not imported).
How do I 'force' Access to import the field, regardless if there is data in the top of the field or not? For instance, I might have 1,000 records that I am importing. If only the last 100 records have data in that field, then, I lose the data because it is not importing the field. | | |
Ed,
In case he doesn't get back to you for a while:
When you import text files, you automatically get an Import Text Wizard
dialog box. In the lower left corner is an Advanced button. Click it to
see the Import Spec dialog box. On this screen you can specify lots of
setting for importing (and exporting) text files.
"Ed Marzan" <du********@aol.com> wrote in message
news:cc**************************@posting.google.c om... Hi Allen,
When I click the Advanced button, all I get is an Advanced Find dialog box. How does one create and save an import spec? I'm jumping in here because I've heard of an Import Spec but the help file doesn't mention it.
Thanks
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:<3f**********************@freenews.iinet.net. au>... Use an import spec.
Place a value in the last column of a sample csv. Start the import manually: File | Get External | Import. After selecting the CSV file, click the Advanced button to save an
import spec.
When you do the import in future, include the import spec in the TransferText so Access knows how many columns it must get.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f***********************@news.frii.net... I am importing a .csv file into Access that has 37 fields. My problem
is that sometimes the last field only has data at the end of the column
(it looks like when you import a file into Access, for the last field, it only checks the top few 'cells' to see if there is any data, if not,
the field is not imported).
How do I 'force' Access to import the field, regardless if there is
data in the top of the field or not? For instance, I might have 1,000
records that I am importing. If only the last 100 records have data in that field, then, I lose the data because it is not importing the field. | | |
Select the file, and open it.
Then choose the Advanced button in the next dialog.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Ed Marzan" <du********@aol.com> wrote in message
news:cc**************************@posting.google.c om... Hi Allen,
When I click the Advanced button, all I get is an Advanced Find dialog box. How does one create and save an import spec? I'm jumping in here because I've heard of an Import Spec but the help file doesn't mention it.
Thanks
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:<3f**********************@freenews.iinet.net. au>... Use an import spec.
Place a value in the last column of a sample csv. Start the import manually: File | Get External | Import. After selecting the CSV file, click the Advanced button to save an
import spec.
When you do the import in future, include the import spec in the TransferText so Access knows how many columns it must get.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f***********************@news.frii.net... I am importing a .csv file into Access that has 37 fields. My problem
is that sometimes the last field only has data at the end of the column
(it looks like when you import a file into Access, for the last field, it only checks the top few 'cells' to see if there is any data, if not,
the field is not imported).
How do I 'force' Access to import the field, regardless if there is
data in the top of the field or not? For instance, I might have 1,000
records that I am importing. If only the last 100 records have data in that field, then, I lose the data because it is not importing the field. | | | Al*********@SeeSig.Invalid (Allen Browne) wrote in
<3f**********************@freenews.iinet.net.au> : Select the file, and open it. Then choose the Advanced button in the next dialog.
That allows you to make changes to the import spec, but you still
have to save it, which requires giving it a name. Then you can call
the import spec by name when importing with TransferText.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc | | |
Sorry, I'm importing Excel spreadsheets and there does not appear to
be a way to save the import spec. I guess it only works with text
files. I'll try exporting the Excel to CSV to see if that works. I'm
ussing Acc 97
Thanks for your help.
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>... Select the file, and open it. Then choose the Advanced button in the next dialog.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Ed Marzan" <du********@aol.com> wrote in message news:cc**************************@posting.google.c om... Hi Allen,
When I click the Advanced button, all I get is an Advanced Find dialog box. How does one create and save an import spec? I'm jumping in here because I've heard of an Import Spec but the help file doesn't mention it.
Thanks
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>... Use an import spec.
Place a value in the last column of a sample csv. Start the import manually: File | Get External | Import. After selecting the CSV file, click the Advanced button to save an import spec.
When you do the import in future, include the import spec in the TransferText so Access knows how many columns it must get.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f***********************@news.frii.net... > I am importing a .csv file into Access that has 37 fields. My problem is > that sometimes the last field only has data at the end of the column (it > looks like when you import a file into Access, for the last field, it > only checks the top few 'cells' to see if there is any data, if not, the > field is not imported). > > How do I 'force' Access to import the field, regardless if there is data > in the top of the field or not? For instance, I might have 1,000 records > that I am importing. If only the last 100 records have data in that > field, then, I lose the data because it is not importing the field.
| | |
I created the 'import spec' and saved it.
After I created it, now, in order to use the spec, every time I import a
file to this table, I have to go to advanced and specifically open it
EVERY TIME. (sometimes I could have a few files to import and it would
be easier to link the 'import spec' to this specific table).
How do you know link the 'import spec' to the table that it will be used
for?
Thanks for all of the responses and I hope someone can help me with this
problem, too,
Reaper
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! | | |
Use the TransferText action (macro or code).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message
news:3f*********************@news.frii.net... How do you know link the 'import spec' to the table that it will be used for? | | |
I setup 'TransferText' macro, but I am having one problem: when I use a
macro, I can not set it up to ask for a file name to import.
In other words, I would like the macro, when ran, to ask the user for a file
to import (every file name is different).
How do I setup the macro to ask the user for a file name to import (possibly
open a box that would allow the user to choose the file to import)?
Thanks,
Reaper
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:3f**********************@freenews.iinet.net.a u... Use the TransferText action (macro or code).
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f*********************@news.frii.net... How do you know link the 'import spec' to the table that it will be used for?
| | |
Use the code in this link to pop up a FileOpen dialog and ask the user to
select a file: http://www.mvps.org/access/api/api0001.htm
If you have never used an API call, it looks a little intimidating, but once
you have done it once it becomes as easy as using a function call.
Although it's possible to call the code in a macro, it really would be
better to use VBA for this. There are so many things that can go wrong with
an import, and the error handling would be very useful.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <73****@comcast.net> wrote in message
news:_L********************@comcast.com... I setup 'TransferText' macro, but I am having one problem: when I use a macro, I can not set it up to ask for a file name to import.
In other words, I would like the macro, when ran, to ask the user for a
file to import (every file name is different).
How do I setup the macro to ask the user for a file name to import
(possibly open a box that would allow the user to choose the file to import)?
Thanks, Reaper
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:3f**********************@freenews.iinet.net.a u... Use the TransferText action (macro or code).
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Grim Reaper" <re****@nospam.com> wrote in message news:3f*********************@news.frii.net... How do you know link the 'import spec' to the table that it will be
used for?
| | This discussion thread is closed Replies have been disabled for this discussion. Similar topics
1 post
views
Thread by D Mat |
last post: by
|
1 post
views
Thread by sparks |
last post: by
|
5 posts
views
Thread by dixie |
last post: by
|
5 posts
views
Thread by hharriel |
last post: by
| |
2 posts
views
Thread by Debbiedo |
last post: by
|
1 post
views
Thread by Phil |
last post: by
| |
1 post
views
Thread by aconti74 |
last post: by
| | | | | | | | | | |