Import Issues

ElijahB

Board Regular
Joined
Feb 2, 2012
Messages
52
Essentially my issue is that I've got a field linked to another table, but when importing data from excel for that field, I have to use the primary key attached to the data. As in say I have two fields, one AutoNumber (the primary key) and one with text. If I try to link to the text field, access actually thinks I'm linking to the primary key field and just displaying the text. So when I import a spreadsheet using text for that field, I get a type mismatch error. Is there any way around this?

I can't just change the primary key to the text field, as there is a possibility (however slight) that two records may have the same text, and I want to avoid having to figure out what the primary key is for each record as there are thousands to go through
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
(If I read your problem right) build your query on the excel sheet, but convert the text field to a number...ie.. CLng([MyTxtFld])
Then make another query to use the above query and manualy link the 2 number fields.
 
Upvote 0

Forum statistics

Threads
1,215,788
Messages
6,126,907
Members
449,348
Latest member
Rdeane

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top