473,498 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

importing a csv to access 2007 using vba

27 New Member
Hi,
I import a csv file to an access table using the following code as a part of a larger code:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acImportDelim, , strTableName, strPath & objFile.Name, True 
Prior to the import, I imported the table manually, so that I have a base table to import to.
Every time I import, I delete the data from the access table and import the new one onto it.
It works fine except for the fact that one of the columns has values of '0' most of the time and sometimes changes to '0.1'.
For some reason the column is always imported as '0'.
I tried to define the column as Double, Decimal, or even text, and nothing works...
Any ideas anyone?

Thanks in advance,
Izhar
Oct 25 '10 #1
0 1061

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4827
by: moses40 | last post by:
I need help importing an excel spreadsheet into an existing access table using vba. However I have a few requirements. 1. It needs to prompt the user to specify where the spreadsheet is 2. It needs...
1
2138
by: AccessHunter | last post by:
Hi, I am trying to create a new application to work with my SQL server database from my Access 2007 using the upsize wizard. It gave me an error saying, "The upsizing wizard cannot convert your...
1
2563
by: transpac80 | last post by:
Problem with SQLPassthrough in Access 2007 using DAO I have this piece of VBA code from inside Access to retrieve data from external database (SQL or Oracle) sConn =...
5
10204
by: sphinney | last post by:
I have data in a few external Access tables that I want to link to my Access 2007 database. Depending on situation (and permissions of the person using the database) I want to dynamically link to...
0
2499
by: ABinBoston | last post by:
Is it possible to change the AutoFormat in Access 2007 using code. There are a number of named auto format themes - like Apex, Aspect, Civic, etc... I would like to have an Access database,...
0
2889
by: ARC | last post by:
Hello all, For right-click (shortcut) menus in access 2007, I've been using a round-about method of opening access 97 on an old computer, modifying my own custom shortcut menus, then importing...
1
4023
by: kfry | last post by:
I am having an issue maybe someone can help with. I have written an application with Access 2003 on my XP pc. I then package it and install it on my VISTA Access 2007 PC. When I do this the wrong...
8
1836
by: jerken | last post by:
Im working in Access 2007 using two Combo boxes to select a category then product type. I am trying to get a couple fields to be displayed based on what the values are in the combo boxes. I have the...
3
3017
by: VivDenham | last post by:
Hi there In MS Access 2007, I have a Form which contains fields that are Visible = False in certain circumstances, and this works perfectly. When I use this form as a Subform in another form,...
1
4136
by: L Chapman | last post by:
I have a form "form2" witha combobox called "namesearch" that lists names from the table "students" once a student is selected from the combobox i want to use a button to only show reports of that...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.