473,388 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

the specified field could refer to more than one table listed in the from clause of y

Expand|Select|Wrap|Line Numbers
  1. DB.Execute "INSERT INTO tblPO_Line_Items ( PO_ID, [Line Number], [Item Number], [Item Order Quantity], UoM, [Unit Price], [Total Line Amt], [Line Item Description], Oploc, [Account Code], Dept, [Sub Division], [Misc Ref], [Last Receipt Date1], [Quantity Received], [Total Amt Received], [Total Amt Paid], [Local Amt], [USD Amt],[OriginalCurrency],[Region], Load_Date )
  2.  SELECT DISTINCT DOL_VOL_LOAD.PO_ID, DOL_VOL_LOAD.[Line Number], DOL_VOL_LOAD.[Item Number], DOL_VOL_LOAD.[Item Order Quantity], DOL_VOL_LOAD.UoM, DOL_VOL_LOAD.[Unit Price], DOL_VOL_LOAD.[Total Line Amt], DOL_VOL_LOAD.[Line Item Description], DOL_VOL_LOAD.Oploc, DOL_VOL_LOAD.Account_Code, DOL_VOL_LOAD.Dept, DOL_VOL_LOAD.[Sub Division], DOL_VOL_LOAD.[Misc Ref], DOL_VOL_LOAD.[Last Receipt Date1], DOL_VOL_LOAD.[Quantity Received], DOL_VOL_LOAD.[Total Amt Received], DOL_VOL_LOAD.[Total Amt Paid], DOL_VOL_LOAD.[Local Amt], DOL_VOL_LOAD.[USD Amt], DOL_VOL_LOAD.[Total Amt Currency Code: Name],DOL_VOL_LOAD.[Region],Date() AS Load_Date " & _
  3.     "FROM (SELECT PO_ID, [Line Number], [Item Number], [Item Order Quantity], UoM, [Unit Price], [Total Line Amt], [Line Item Description], Oploc, tblLookup_Accounts.ID AS Account_Code, Dept, [Sub Division], [Misc Ref], [Last Receipt Date1], [Quantity Received], [Total Amt Received], [Total Amt Paid], [Local Amt], [USD Amt],[OriginalCurrency],[Region]  FROM (SELECT tblPO_Data.ID AS PO_ID, [Line Number], [Item Number], [Item Order Quantity], [Real UOM] AS UoM, [Unit Price], [Total Line Amt], [Item Description] AS [Line Item Description], Oploc, [Account Class] & [Sub Account] AS ACCOUNT_CODE_TEXT, Dept, [Sub Division], [Misc Ref2] AS [Misc Ref], [Last Receipt Date] AS [Last Receipt Date1], [Item Order Quantity] AS [Quantity Received], [Total Document Amount] AS [Total Amt Received], DOL_VOL_LOAD.[Total Amt Paid], [Local Amt], [USD Amt],DOL_VOL_LOAD.[Total Amt Currency Code: Name],[Region] " & _
  4.     "FROM DOL_VOL_LOAD INNER JOIN tblPO_Data ON DOL_VOL_LOAD.[Document Number] = tblPO_Data.PO_Number)  
  5. AS DOL_VOL INNER JOIN tblLookup_Accounts ON DOL_VOL.ACCOUNT_CODE_TEXT = tblLookup_Accounts.Account_Code) 
  6.  AS DOL_VOL_LOAD LEFT JOIN tblPO_Line_Items ON (DOL_VOL_LOAD.[Line Number] = tblPO_Line_Items.[Line Number])
  7.  AND (DOL_VOL_LOAD.PO_ID = tblPO_Line_Items.PO_ID) WHERE tblPO_Line_Items.ID Is Null"
Jul 11 '14 #1
1 1166
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code or formatted data.

That error means you referenced a field that exists in more than one table and it doesn't know which one to use because you didn't tell it which table you want the field from.
Jul 11 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: dixie | last post by:
I have a table called "tblParticipants" with a field called "ID", which must be indexed with No duplicates allowed. I am looking for a way of doing in vba a small if ..then ..else .. routine that...
4
by: Kathy | last post by:
I have a query that is being created in code. When the query is executed I get the error: "The specified field 'Acct' could refer to more than one table listed in the FROM clause". As you can...
1
by: Wei Wang | last post by:
Hi, Sorry for asking the dynamic command question without thoroughly reading the documentation first. Thanks a lot for your reply, Richard. ;-) Now this may be a naive SQL question: Is there...
14
by: rbowman40 | last post by:
I am trying to design a form in which a category (field in a table) is selected from a combo box, then a value for that category is entered in a form field. I want that value to be placed in the...
4
by: jtidwell | last post by:
I am getting this error after running my query The specified field could refer to more than one table listed in the FROM clause of your SQL statement. (Error 3079) my contractnum is a one to...
1
by: solar | last post by:
Is there any way to refer to figure in the frist row of the field in the table. The field is called afid.For example, if the figure in the first row is 1, or afid = 1, then to delete all the other...
9
by: trey3143 | last post by:
i have a database that keeps giving me the error The specified field could refer to more than one table in your from clause. I have tried everything and can't figure it out. I have a command that...
1
by: Alison Dawson | last post by:
I keep getting "The specified field "customer" could refer to more than one table listed in the FROM clause of your SQL statement. I understand what it means but I dont know how to change it. I have...
0
by: lizfbolt | last post by:
I am creating a report in access 2010 based on a query. this is my first year in access, any help is much appreciated!!!! Here is the SQL from my query (I have no issues running the query) ...
10
by: vnicosia | last post by:
ACCESS 2010: I have a report in ACCESS 2010 that when I try to run it says: "The specific field".TERM" could refer to more than one table listed in the FROM clause of your SQL statement." It ran...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.