Rob,
1. Add fldTruck, fldLitres, fldSpeedometer as new fields in tblFuelHeader
2. Link to the Excel worksheet
3. Create an append query to append fldDate, fldTruck, fldLitres,
fldSpeedometer from the linked Excel table into tblFuelHeader
4. Run the append query
5. Create an append query to append the primary key and fldTruck, fldLitres,
fldSpeedometer from tblFuelHeader into tblFuelDetail
6. Run the append query
7. Open tblFuelHeader in design view and delete the fields fldTruck,
fldLitres, fldSpeedometer
You're doing it this way so that you get a foreign key for each appended record
of fldTruck, fldLitres, fldSpeedometer that matches the primary key for each
fldDate record appended to tblFuelHeader
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
"OM" <le******@loxinfo.dot.co.th> wrote in message
news:c9**********@news.loxinfo.co.th...
How do I import excel data into 2 joined tables ?
The data is fldDate, fldTruck, fldLitres, fldSpeedometer.
fldDate goes in a table tblFuelHeader, and the rest goes in tblFuelDetail,
with a one to many relationship between tblFuelHeader and tblFuelDetail.
I have a lot of legacy data, and no desire to type it all in.
Any help greatfully received, seized upon, and used immediately.
Rob Lepper