473,473 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

imported selected fields to table from xls file

21 New Member
Hey guys,
I have a .xls file. Lets call it "MyExcel.xls". And I have a .mdb called "MyDB.mdb" and there's tw tables 't1' and 't2'.
I want to import some selected fields of Myexcel.xls into 't1' and 't2'. t1!=t2.
and t1 and t2 have a particular coloumn order that i need to follow and myxls is also of a fixed unchangable column order.
All tips appriciated!
Oct 29 '10 #1
4 1626
jimatqsi
1,271 Recognized Expert Top Contributor
Try linking to the Excel sheet. Then you can treat the Excel sheet as an input table and create a query to pull data from it. You can find the link tool under File / Get External Data / Link.

Jim
Nov 1 '10 #2
dileshw
21 New Member
Thanks!
IU am trying that, and it seems promising, but i have another issue now:

My DB has 3 tables T1, T2 and T3. and the relationships are as follows:
T1.primaryKey = T2. forignKey
T2.primaryKey = T3. forignKey
But T2's PK is an autonumber that MS access generates, and this automumber is generated only when a record is created in the DB. So if i were to append the records that i extracted from the xls file, there wont be a PK. Ehnce, there wont be a auto number in T2 for T3 to be linked to.
Anyone got any idea?
Nov 3 '10 #3
jimatqsi
1,271 Recognized Expert Top Contributor
You didn't mention T3 in the original post, so I am assuming you are not yet building that in this xls import operation. That being the case, there is no problem. When you are creating T2 you supply the foreign key to T1 and they system will supply the primary key to T2.

Also, please note that you should not append a new question on an existing thread. A new thread should be started for the new problem/question.

Jim
Nov 3 '10 #4
dileshw
21 New Member
Thanks Jim. Sorry, I thought it might be easier for someone to understand the problem if they knew the background to it. Lesson learnt for next time :)

thanks again!
Nov 10 '10 #5

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

Similar topics

2
by: allyn44 | last post by:
Hello, I have a form that I need to transfer some of the info into a second form based on a different query. The Id field is the same for data sources for both forms, but are based on...
3
by: Steve | last post by:
I have a table in a database that is currently linked via ODBC to a sensitive personnel table in another system. The database only needs such fields as name, address and telephone number and does...
2
by: Dave | last post by:
Hi I'm creating a fairly simple Staff database using Access 97. There is a table, which stores all of the staff details (initials, firstname, surname, tel. no. etc.) and I want to design a...
0
by: dave k | last post by:
I want to copy data from selected fields in a record on a tabular form (called 'ProductUpdate') to the next record when those two records have a common field - called 'BaseFund' . The selected...
5
by: Troels Arvin | last post by:
Hello, Every so often, I'm asked to help people recover data from tables that were either dropped or where to much data was DELETEed. The complications related to restoring data are a problem....
1
by: Invicta | last post by:
There are two fields I need to copy preferably using a command button. If possible I would also like to stipulate how many new records I want. I've made a start using the in built Duplicate Record...
2
by: laph | last post by:
I have two databases (DB 1 and DB 2) that linked together by a particular table. So database 1 could see a table in DB 2. Table1 belongs to DB1. Table2 belongs to DB2 but link to DB1. - On this DB...
4
by: jmar93 | last post by:
Help, I have an access 2007 database that imports data from an sql database, one of the fields can contain multible inputs. One of the is "Spec\Met\OEM", when it is added to table in my database...
37
by: viki1967 | last post by:
Hi all. I have this simple form. I need if checkbox C_1 is selected: 1) field name="n_1" is required and accept only numbers; 2) field name="n_2" is required and accept only numbers; I...
1
by: shailajapatil | last post by:
Hi, Is it possible to create a form which will allow a user to select certain fields they require to print on a report and then to be able to add criteria to their selection and have the report...
0
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
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...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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.