Any way to force Access to use data type for linked tables?

ggranger007

Board Regular
Joined
Jan 21, 2007
Messages
107
I am having issues with an earlier join created against a linked table. Access decided it wanted to change from "text" to the "number" data type and now I am receiving a "type mismatch in expression" error.

The issue is, most of the data in the linked table is a number, however there are a few exceptions where it has to be checked against data with characters (i.e. 98A2). Is there any way to change or force the data type for a linked table?
 
Got stuck with the same trouble today, worked around by changing the discrepant Excel column format to 'Text' and saving the excel file (i needed the column to be text instead of access guessing it to be number) ... revert the column back to 'General' cell formatting and save the excel file just before exiting the VBA routine.

This might be a preferable method than risking unwanted data rows in base excel file (just in case the ) and also having to handle these extra rows by additional coding.

Thank you Xenou - your remark on spreadsheet data typing prompted me to try out this method.
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,067
Messages
6,122,949
Members
449,095
Latest member
nmaske

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