I have developed a database which acts as a stock control database and I am trying to create an invoice from the data in the database. The previous database I used was no good for keeping a tally of the stock that I am selling, hence the need to write another database.
The stock control part works well, but the Invoice part that I have tried to model on the old invoice form does not work correctly as I get an Enter a Parameter Value for fkOrderID when I open the form, but this is not a field name I use, because in the new database I changed the name to fkOrderNo??
I have searched through the fields and I can't find the field name mentioned anywhere!
I will attach a copy of the Relationship diagram and the query views of the new database and the original database to the post.
Here is the SQL view of the invoice form for new database:
Code:
SELECT tbl_Customers.CustomerNo, tbl_Customers.CustomerFullName, tbl_Customers.CustomerStreet, tbl_Customers.CustomerCity, tbl_Customers.CustomerRegion, tbl_Customers.CustomerPostCode, tbl_Customers.CustomerTel, tbl_Customers.Fullname, tbl_Customers.fkOrderNo, tbl_COrders.OrderNo, tbl_COrders.fkCustomerNo, tbl_COrders.OrderDate, tbl_OrderLine.LineID, tbl_OrderLine.fkOrderNo, tbl_OrderLine.fkPartNo, tbl_OrderLine.OrderQty, tbl_OrderLine.LineTotal, tbl_Parts.PartNo, tbl_Parts.PartName, tbl_Parts.SalePrice, tbl_Parts.Part_DescriptionFROM tbl_Customers INNER JOIN (tbl_Parts INNER JOIN (tbl_COrders INNER JOIN tbl_OrderLine ON tbl_COrders.OrderNo = tbl_OrderLine.fkOrderNo) ON tbl_Parts.PartNo = tbl_OrderLine.fkPartNo) ON tbl_Customers.CustomerNo = tbl_COrders.fkCustomerNo;
Here is the SQL view of the invoice form for original database:
Code:
SELECT Order.OrderID, Order.fkCustID, Order.OrderDate, Customer.Name, Customer.Address1, Customer.Address2, Customer.Town, Customer.County, Customer.Postcode, Products.[eBay Sell Price], Products.ProductID, [OrderID]+2038 AS Expr1 FROM Products
INNER JOIN
((Customer INNER JOIN [Order] ON Customer.[CustID] = Order.[fkCustID])
INNER JOIN OrderLine ON Order.OrderID = OrderLine.fkOrderID);
I'm afraid I am baffled why this field is appearing as it is not a field in the database!!
Any ideas will be appreciated!