Link Tables

P

Pass-the-reality

There is table called MainTable. Within this table the field SAN was marked
as a text field. I have linked tables from another database (which I do do
not own) and they have the SAN listed as a Number. When I try to create a
query and link SAN to SAN I get an error message that the Type mismatch in
Expression. What can I do to link these two tables together? I would change
my SAN to a number, but I did not create the database and am not sure if
changing this would cause any issues with the queries already in use.
 
J

Jeff Boyce

One approach would be to create a new query that converts what you have to a
number, then use THAT query in place of the table itself.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Douglas J. Steele

It may not be necessary to create the intermediary query.

Simply go into the SQL of the existing query, and change the

ON Table1.Field1 = Table2.Field2

to

ON CLng(Table1.Field1) = Table2.Field2
 
J

Jeff Boyce

Nice! Does that also reflect in the design view, or is this a SQL-only
solution?

Jeff
 
D

Douglas J. Steele

I don't there's any way of doing that other than through the SQL.

And once you make that change, you won't be able to go back to Design View.
 
J

Jeff Boyce

Well, that explains a lot ... If I can't see it in design view, I rarely
'get it' (except for UNION queries, those I get)...

Thanks again, that's my 'learn something new' for today!

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top