473,769 Members | 5,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing data

I have a text file that I am importing into an Access table that was
generatred from data exported from a Word file. Several (about 20-30)
fields are from check boxes on the Word form. These fields have either
0 (Not checked) or 1 (Checked). Due to requirements from a third party
software application, they HAVE to be either Y(Checked) or N (Not
checked) and MUST be a text field in the Access table.

I will be importing several thousand of these files into the Access
table so I will want to automate the process as much as possible.

I am using MS Office 2003 Suite.

I know I can import fields into a Y/N field type, display them as Yes/
No text box fields and then change them to text fields with a field
size of 1 but this is a very labor intensive task when there are 20-30
fields per file imported.

Any ideas as to how to approach this?

Thank you in advance

Debbie

Jun 8 '07 #1
2 2732
set up spec
"Debbiedo" <de**********@y ahoo.comwrote in message
news:11******** **************@ r19g2000prf.goo glegroups.com.. .
>I have a text file that I am importing into an Access table that was
generatred from data exported from a Word file. Several (about 20-30)
fields are from check boxes on the Word form. These fields have either
0 (Not checked) or 1 (Checked). Due to requirements from a third party
software application, they HAVE to be either Y(Checked) or N (Not
checked) and MUST be a text field in the Access table.

I will be importing several thousand of these files into the Access
table so I will want to automate the process as much as possible.

I am using MS Office 2003 Suite.

I know I can import fields into a Y/N field type, display them as Yes/
No text box fields and then change them to text fields with a field
size of 1 but this is a very labor intensive task when there are 20-30
fields per file imported.

Any ideas as to how to approach this?

Thank you in advance

Debbie

Jun 8 '07 #2
On Fri, 08 Jun 2007 01:05:26 -0000, Debbiedo <de**********@y ahoo.com>
wrote:

So import into a "temp" table and then use an append query to import
into the "real" table, in the process converting from 0,1 to n,y.

insert into tblRealTable(fi eldYN1, ...)
select Choose(FieldYN1 , "N", "Y")
from tblTempTable
(lookup the Choose function in the Help file)

As ECOOK mentioned (tersely), you may be able to set up an Import
Specification to do the same. Import the text file, and save the
specs. Later on, you can use the saved specs in DoCmd.TransferT ext

Note that the display of a value has little to do with how it's
stored. Also note than in VBA, True has a value of -1, not 1. But it
will typically work because True is also (NOT False).

-Tom.

>I have a text file that I am importing into an Access table that was
generatred from data exported from a Word file. Several (about 20-30)
fields are from check boxes on the Word form. These fields have either
0 (Not checked) or 1 (Checked). Due to requirements from a third party
software application, they HAVE to be either Y(Checked) or N (Not
checked) and MUST be a text field in the Access table.

I will be importing several thousand of these files into the Access
table so I will want to automate the process as much as possible.

I am using MS Office 2003 Suite.

I know I can import fields into a Y/N field type, display them as Yes/
No text box fields and then change them to text fields with a field
size of 1 but this is a very labor intensive task when there are 20-30
fields per file imported.

Any ideas as to how to approach this?

Thank you in advance

Debbie
Jun 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2742
by: steve | last post by:
Hi, I have researched but have not found a good solution to this problem. I am importing large amounts of data (over 50 Meg) into a new mysql db that I set up. I use >mysql dbname < importfile.txt But I keep getting timeouts and errors due to the data being too large. I know that since if I break the imported data into multiple chuncks (by importing a few tables at a time) then everything works.
11
3418
by: Grim Reaper | last post by:
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...
1
3679
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
7
3065
by: Darren | last post by:
I have been attempting to create a reservation planning form in excel that imports Data from an Access database and inserts that information automaticly into the correct spreed sheet and the correct cells within that worksheet. The Excel Book is made up of 12 worksheets named Jan-Dec. Each worksheet has columns labeled as each day of that month. Column 'A' is reserved for 19 rows named "room1 - room19". The data I am importing from the...
2
3610
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records that are "dirty" i.e. the field contents do not comply with the expected format (date/time) and they end up in a seperate table of import errors. (The records in "error" are actually empty fields.) This is a regular event and I do not want to...
7
3306
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
0
1487
by: Mike Collins | last post by:
I am importing a XML file and have not been having the best of luck in doing this, but I do have the following solution below. I will not be importing more than 2000 records at a time, but will be importing data to many different tables. Can someone explain if there is a better way to do what I am doing without having to call a stored procedure for each row (like I'm doing below)? A good example would be great as my understanding of xml or...
2
2115
by: Mike Collins | last post by:
I am importing a XML file and have not been having the best of luck in doing this, but I do have the following solution below. I will not be importing more than 2000 records at a time, but will be importing data to many different tables. Can someone explain if there is a better way to do what I am doing without having to call a stored procedure for each row (like I'm doing below)? A good example would be great as my understanding of xml or...
5
3176
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All districts have used the same excel template and populated the same 32 data fields (columns). I created one large excel file from all 49 files which gives me a master table of 60,000 or so records. I have tried to import this master table into access...
12
6222
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the datagrid. Once I can get to that point I need some way to be able to add new data only to the new columns that were added. Here is some of my code: //Function For Importing Data From CSV File public DataSet ConnectCSV(string filetable)
0
9586
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.