HELP HELP HELP really simple - it just won't work!

C

ClaireB

Hi, help on this would be much appreciated....

I have a database very similar to the northwind example i.e. supplier
product, customer, order etc....

I have set up a form with a sub form for customer orders exactly a
shown in the example database however my sub form not workin
properly.

sql below

SELECT DISTINCTROW [Order Details].OrderID, [Order Details].ProductID
[Product Table].ProductName, [Order Details].UnitPrice, [Orde
Details].Quantity, [Order Details]!UnitPrice*[Order Details]!Quantit
AS Total
FROM [Product Table] INNER JOIN [Order Details] ON [Produc
Table].ProductID = [Order Details].ProductID
ORDER BY [Order Details].OrderID[/QUOTE];

query runs fine apart from the UnitPrice does not automatically fil
when the product ID is input........ :confused:

Where am i going wrong the tables have a one to many relationship an
the UnitPrice fields are exactly the same.....

any ideas pleassssseeee........... :)

clair
 
M

Marshall Barton

ClaireB said:
I have a database very similar to the northwind example i.e. supplier,
product, customer, order etc....

I have set up a form with a sub form for customer orders exactly as
shown in the example database however my sub form not working
properly.

sql below

SELECT DISTINCTROW [Order Details].OrderID, [Order Details].ProductID,
[Product Table].ProductName, [Order Details].UnitPrice, [Order
Details].Quantity, [Order Details]!UnitPrice*[Order Details]!Quantity
AS Total
FROM [Product Table] INNER JOIN [Order Details] ON [Product
Table].ProductID = [Order Details].ProductID
ORDER BY [Order Details].OrderID
;

query runs fine apart from the UnitPrice does not automatically fill
when the product ID is input........ :confused:[/QUOTE]


You have ! instead of . in the expression that isn't
working and the ORDER BY clause doesn't make sense.

If you retyped the query and introduced some typos into the
problem, try reposting with a Copy/Paste of the query's SQL
statement.
 
C

ClaireB

SELECT DISTINCTROW [Order Details].OrderID, [Order Details].ProductID
[Product Table].ProductName, [Order Details].UnitPrice, [Orde
Details].Quantity, [Order Details].UnitPrice*[Order Details]!Quantit
AS Total
FROM [Product Table] INNER JOIN [Order Details] ON [Produc
Table].ProductID=[Order Details].ProductID
ORDER BY [Order Details].OrderID;

The above is an exact copy of the sql.... many thanks for any help

clair
 
C

ClaireB

forgot to say the the product name autofills and wanted the unit pric
to do the same so that the user wouldn't have to look it up manually.

regards
clair
 
B

Brian Bastl

[Order Details].UnitPrice*[Order Details]!Quantity

should be:
*[Order Details].Quantity

Brian
 
M

Marshall Barton

ClaireB said:
forgot to say the the product name autofills and wanted the unit price
to do the same so that the user wouldn't have to look it up manually.


I have no idea what you mean by "autofills".

Be sure to check Brian's reply where he points out that you
still have a ! instead of a .
 

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