Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

Run Time Error -2147217900 (80040014) - Ambiguous column name 'ID_Company'

This is code I have inherited and have been asked to debug. Screen Shot 1 shows the form that is executed that generates the error. I click 'Debug' and What is seen in Screen Shot 2 appears. I believe the numeric code indicated a possible problem with a Join satement. The .txt file attached shows the SQL statement that the error points to, 'strSQL'.
Could someone verify that I am on the right track and advise what I should do to resolve this error?
Thanks in Advance.
Screen-Shot1.JPG
Screen-Shot2.JPG
SQLstr.txt
0
tesla764
Asked:
tesla764
  • 2
1 Solution
 
Gary DewrellSenior Network AdministratorCommented:
Both tables you are accessing have a column ID_Company. You need to fully qualify the column  table.collumn name so sql knows which ID_Company in which table you are referencing.
0
 
tesla764Author Commented:
Yes I see that I need to preface the names to make them distinguished.
thanks.
0
 
Gary DewrellSenior Network AdministratorCommented:
You are very welcome. Have a great day.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now