Updating fields in table with new data - help (1 Viewer)

Iceman.dk

New member
Local time
Today, 12:30
Joined
Jun 17, 2007
Messages
2
Hello

I have a table with 3 fields:
- ID no (primany key), Time1 and Time2
I have 3 records with ID no 1 to 3.
So my table look like this

ID no: Time1: Time2:
1 [emty] [emty]
2 [emty] [emty]
3 [emty] [emty]

I have an Excel document with the data for field Time1 and another Excel dokument with the data for field Time2. Excel doc1 have 2 colums named ID no and Time1. And Excel doc2 have 2 colums named ID no and Time2.

How do I import/update these data into my table?

I have tried wiht a adding-quiry but it only works if the table is complety emty and only with one Excel doc. Trying the second Excel doc afterwards only makes an error and no fields are updated.:confused:
 

dcobau

Registered User.
Local time
Tomorrow, 05:30
Joined
Mar 1, 2004
Messages
124
I would:

1) Import/link the spreadsheets and
2) use a make table query to recreate the table

but be careful, funny things can happen with data from Excel.

Dave
 

neileg

AWF VIP
Local time
Today, 20:30
Joined
Dec 4, 2002
Messages
5,975
I don't understand why you have created 3 empty records. If the ID no is an autonumber, you can just append the records from the Excel sheet and Access will allocate ID nos.
 

Iceman.dk

New member
Local time
Today, 12:30
Joined
Jun 17, 2007
Messages
2
My table consist of 90 records. I just show 3 for illustration...

Each record is a competitor in a motor-race competition. The ID no is not an autonum, but a (start)number given before the start of the competition.

After run no.1 I have to put data into the field called "Time1". The data come from a timing device and is put out in a txt file with TAB seperation (i just converted to Excel because I easily could delete unnessesary informations).

After run no.2 I have to put data into the field called "Time2". This data come from same timing device as time1.

There will go hours between getting Time1 and Time2. And I have to put in data ind to the database as soon as they are ready due to printing a list og result.

I hope this make it a little more understandable.
 

neileg

AWF VIP
Local time
Today, 20:30
Joined
Dec 4, 2002
Messages
5,975
I don't think your approach is correct. You need a table with competitor details which would include their number. You then add the time data to a different table including their number, but only adding records for the data you have (no blank records). You then join the two tables together using the competitor number as the link.
 

Users who are viewing this thread

Top Bottom