Please Help With This Quey

Jul 30, 2005

This is surely simple, but I can't figure it out.
Basically here are the 3 tables in my query with their respective fields.
tblItems (ItemNo,Location)
tlbDescriptions (ItemNo, ItemDesc)
tblOrders (ItemNo, OrderQty)

I want to list all items with their related descriptions and list any orders associated with the items.

Here's what I have so far (in sql):

SELECT tblItems.ItemNo, tblItems.Location, tblDescription.ItemNo, tblDescription.ItemDesc
FROM tblDescriptions INNER JOIN tblItems ON tblDescriptions.ItemNo=tblItems.ItemNo
WHERE tblItems.Location = "1";

This seems to work fine, except that when I try to include the last table (tblorders) to find out which items have orders, it gives me only those items that have orders. What I want is all the items and see the ordered qty if there is for that item.

Now this is an external database so I can't change any of the tables and I have to do this in one query.

Can anyone help me on this?
TIA

View Replies


ADVERTISEMENT

Can't Add Data To Quey/table

Jan 17, 2006

I can not, or not allowed to enter data in fields in a query built from three tables that are jointed by a common field with the same name. The parent table is linked to another Access data base as is one child table the other is local data. Also, I am not able to view the child table data when viewing the parent table.

View 1 Replies View Related

Using Quey Criteria From A Combo Box?

Nov 7, 2007

i have a combo box in a form listing various people featured in pictures. i expected that if i chose a person from the combo and created a query with the criteria [Forms]![form name]![combobox name] in the person field then i would get a list of all pictures relating to that person -- this doesnt seem to work for combo boxes? -- if i change the combo box to textbox and insert a name --then it works. am i missing something very simple here?

View 2 Replies View Related

Quey Producing Out Of Bound Results

Apr 6, 2006

Hi all,

I am performing the following query using an ADO connection from Excel;


SELECT [Date], SUM([Batch Qty]) As [Batch] FROM [Speed Fastener Packing] WHERE ([Date] BETWEEN #03/04/2006# AND #05/04/2006#) GROUP BY [Date] ORDER BY [Date]


When I execute this statement in Access it generates The following;

Date Batch
04/03/20063463000
06/03/20062747000
07/03/20062738000
08/03/20063867000
09/03/20064970000
10/03/20066235000
11/03/2006757000
13/03/20062170000
14/03/20063864000
15/03/20066929000
16/03/20063342000
17/03/20067017000
18/03/20063440000
20/03/2006985000
21/03/20064330000
22/03/20067578000
23/03/20064367000
24/03/20065003000
27/03/20063726000
28/03/20064383000
29/03/20066367000
30/03/20064358000
31/03/20064840000
01/04/20063136000
03/04/20061102000
04/04/20063000000
05/04/20065724000
06/04/20061687000

Why is the statement returning results that are not between the dates specified?? The [Date] field in the Db is in format Date/Time Short Date dd/mm/yyyy.

Dont have a clue what I'm doing wrong! TIA, any ideas appreciated!

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved